chore: Rename to doc.jinko-lang.dev #31
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
name: Build and push to site branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
fetch-depth: '0' | |
- name: Install packages | |
run: pip install mkdocs-material | |
- name: Build website | |
run: mkdocs build | |
- name: Backup generated files | |
run: mv site /tmp/ | |
- name: Add CNAME | |
working-directory: /tmp/site | |
run: echo 'docs.jinko.ml' > CNAME | |
- name: Commit changes | |
working-directory: /tmp/site | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-action" | |
git config --global init.defaultBranch "main" | |
git init | |
git add . | |
git commit -m "Automatic update of website. Build from $GITHUB_SHA" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
directory: /tmp/site | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: site | |
force: true |