Skip to content

Deploy Docs

Deploy Docs #74

Workflow file for this run

name: Deploy Docs
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
ACT3_VERSION: 0.4.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download act3
run: |
curl -s -OL https://github.com/dhth/act3/releases/download/v${{ env.ACT3_VERSION }}/act3_${{ env.ACT3_VERSION }}_linux_amd64.tar.gz
tar -xzvf act3_${{ env.ACT3_VERSION }}_linux_amd64.tar.gz
- name: Generate GH token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GH_TOKEN_APP_ID }}
private-key: ${{ secrets.GH_TOKEN_APP_PRIVATE_KEY }}
- name: Generate doc
run: |
./act3 \
-config-file=./examples/html/act3.yml \
-format=html \
-html-template-file=./examples/html/template.html > ./examples/html/docs/index.html
env:
ACT3_GH_ACCESS_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./examples/html/docs
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4