github pages #1041
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: github pages | |
on: | |
push: | |
branches: | |
- main | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
schedule: | |
- cron: '0 20 * * *' | |
# https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/events-that-trigger-workflows#discussion | |
discussion: | |
types: [created, edited, answered, deleted, transferred] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- run: yarn | |
- run: yarn posts:ci --token=${{ secrets.GITHUB_TOKEN }} --repository=${{ github.repository }} --type=${{ secrets.GG_TYPE }} --dis-owner=${{ secrets.GG_DIS_OWNER }} --dis-repo=${{ secrets.GG_DIS_REPO }} --issues-owner=${{ secrets.GG_ISSUES_OWNER }} --issues-repo=${{ secrets.GG_ISSUES_REPO }} --issues-state=${{ secrets.GG_ISSUES_STATE }} | |
- run: yarn reconf | |
- run: yarn build | |
- run: yarn copy | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
force_orphan: true |