-
Notifications
You must be signed in to change notification settings - Fork 877
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workflow] Auto build and publish site
- Loading branch information
1 parent
11fa69d
commit 27eb6e2
Showing
3 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build site and push to gh-pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build site | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Configuring build Environment | ||
run: | | ||
sudo apt-get update | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0' | ||
|
||
- name: Installing dependencies | ||
run: | | ||
gem install jekyll jekyll-remote-theme jekyll-sass-converter | ||
- name: Build site | ||
run: | | ||
cd site && jekyll b && cd .. | ||
- name: Push to gh-pages branch | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
git remote set-url origin https://x-access-token:${{ secrets.MLC_GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git config --global user.email "mlc-gh-actions-bot@nomail" | ||
git config --global user.name "mlc-gh-actions-bot" | ||
./scripts/gh_deploy_site.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.