Created
January 4, 2024 14:53
-
-
Save vadimkantorov/bb7b1722b1a524eca07ed27721b78fa8 to your computer and use it in GitHub Desktop.
Example GitHub Workflow for downloading run artifacts and pushing to gh-pages
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: web | |
on: | |
workflow_dispatch: | |
inputs: | |
build_runid: | |
description: 'build_runid' | |
required: true | |
default: '7410445048' | |
permissions: write-all | |
jobs: | |
web: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Download exported JSON from the provided runid | |
run: gh run download ${{ github.event.inputs.build_runid }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to gh-pages | |
run: | | |
echo foo > foo.html | |
git config user.name 'Your Name' | |
git config user.email '[email protected]' | |
git add -A foo.html | |
git commit -a -m ... | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment