Updating code sample. #69
This file contains hidden or 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
# Script based on following guide: | |
# https://kaizendorks.github.io/2020/04/16/vuepress-github-actions/ | |
name: Deploy VuePress static site to GitHub pages | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Generate static vuepress files | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- run: npm install | |
- run: ./deploy.sh | |
- name: Commit generated files | |
run: | | |
cd gh-pages | |
echo "thingset.io" > CNAME | |
git init | |
git add -A | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m 'deploy' | |
- name: Force-push to destination branch | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: ./gh-pages |