Skip to content

Build Static Page #1509

Build Static Page

Build Static Page #1509

name: Build Static Page
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0,12 * * *' # 00:00 and 12:00 UTC
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
- name: Generate Models Webpage
run: bash ${{ github.workspace }}/update-sdmodels.sh
shell: sh
- name: Commit Changes
uses: devops-infra/action-commit-push@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
add_timestamp: false
commit_prefix: "[AUTO] "
commit_message: "Update static page"
force: false
deploy:
needs: generate
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'main'
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1