Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
Created January 4, 2024 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vadimkantorov/bb7b1722b1a524eca07ed27721b78fa8 to your computer and use it in GitHub Desktop.
Save vadimkantorov/bb7b1722b1a524eca07ed27721b78fa8 to your computer and use it in GitHub Desktop.
Example GitHub Workflow for downloading run artifacts and pushing to gh-pages
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 'your@name.domain'
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