Skip to content

publish

publish #543

Workflow file for this run

on:
repository_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
env:
GHAPI_URL: https://api.github.com/repos/linux-kernel-labs/linux/actions/runs/${{ github.event.client_payload.run_id }}/artifacts
run: |
export ZIP_URL=$(curl -u ${{ secrets.ACCESS_TOKEN }} $GHAPI_URL | jq -r .artifacts[0].archive_download_url)
curl -L -u ${{ secrets.ACCESS_TOKEN }} -o docs.zip $ZIP_URL
test -e docs.zip
- name: Publish
env:
DIR: ${{ github.event.client_payload.dir }}
run: |
rm -rf $DIR
mkdir -p $DIR
unzip -d $DIR docs.zip
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add $DIR
git commit --allow-empty -m "Publish $DIR"
git push