GitHub Pages #1613
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: | |
repository_dispatch: | |
types: telegram_bot_api | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: 'master' | |
- name: Build generator | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --package gh-pages-generator --bin gh-pages-generator | |
- name: Generate schemas | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: --package gh-pages-generator --bin gh-pages-generator -- production | |
- name: Generate (dev) schemas | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: --package gh-pages-generator --bin gh-pages-generator -- dev | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
publish_branch: gh-pages | |
keep_files: true |