Release Docs #16
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: 'Release Docs' | |
on: | |
workflow_dispatch: | |
env: | |
DOC_ARTIFACT: webHelpPQ2-all.zip | |
# Gives the workflow permissions to clone the repo and create a page deployment | |
permissions: | |
id-token: write | |
pages: write | |
jobs: | |
release: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest run ID | |
id: runid | |
run: | | |
run_id=$(curl --request GET \ | |
--url https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yml/runs \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
| jq '.workflow_runs[] | select(.status=="completed") | .id' | head -1) | |
echo "::set-output name=run-id::$run_id" | |
- name: ⬇️ Download last artifacts from build.yml | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
github-token: ${{ secrets.GH_PAT }} | |
run-id: ${{ steps.runid.outputs.run-id }} | |
- name: 🔍 view artifacts to be used | |
run: ls -R | |
working-directory: . | |
# - name: Unzip artifact | |
# uses: montudor/action-zip@v1 | |
# with: | |
# args: unzip -qq docs/${{ env.DOC_ARTIFACT }} -d dir | |
# - name: Setup Pages | |
# uses: actions/configure-pages@v2 | |
# - name: Upload artifact | |
# uses: actions/upload-pages-artifact@v1 | |
# with: | |
# path: dir | |
# - name: Deploy to GitHub Pages | |
# id: deployment | |
# uses: actions/deploy-pages@v1 |