Publish Website #2722
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: Publish Website | |
on: | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: "0 */12 * * *" # Run every 12 hours | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Checkout documentation | |
run: npm run clone-docs | |
- name: Build project | |
run: npm run build | |
- name: Create 404 page | |
run: cp ./dist/index.html ./dist/404.html | |
- name: Deploy website | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
force_orphan: true | |
user_name: 'upbge[bot]' | |
user_email: 'upbge[bot]@users.noreply.github.com' | |