ref: 4c0fa6732e6f56979924b1a4299ca3f811ecfba6
parent: e9d9a44687c94c1036601f72a5ea0fc15a9aad5c
author: ISSOtm <eldredhabert0@gmail.com>
date: Tue Mar 9 15:10:14 EST 2021
Fix release doc creation workflow
--- a/.github/workflows/create-release-docs.yml
+++ b/.github/workflows/create-release-docs.yml
@@ -2,24 +2,22 @@
on:
release:
types:
- - created
+ - released # This avoids triggering on pre-releases
jobs:
build:
runs-on: ubuntu-18.04
steps:
- - name: Checkout rgbds@master
+ - name: Checkout rgbds@release
uses: actions/checkout@v2
with:
- repository: gbdev/rgbds
- ref: master
path: rgbds
- name: Checkout rgbds-www@master
uses: actions/checkout@v2
with:
- repository: gbdev/rgbds-www
- ref: master
+ repository: ${{ github.repository_owner }}/rgbds-www
path: rgbds-www
+ # `-O toc` was added in 1.14.5, but the repos only have 1.14.4
- name: Build and install mandoc
run: |
sudo apt-get -qq update
@@ -32,23 +30,23 @@
sudo make install
- name: Update pages
working-directory: rgbds
- run: |
- ./.github/actions/get-pages.sh ../rgbds-www/_documentation ${GITHUB_REF}
+ run: | # The ref appears to be in the format "refs/tags/<version>", so strip that
+ ./.github/actions/get-pages.sh -r ../rgbds-www ${GITHUB_REF##*/}
- name: Push new pages
working-directory: rgbds-www
run: |
mkdir -p -m 700 ~/.ssh
- echo "${{ secrets.SSH_KEY_SECRET }}" > ~/.ssh/id_ed25519
+ cat > ~/.ssh/id_ed25519 <<<"${{ secrets.SSH_KEY_SECRET }}"
chmod 0600 ~/.ssh/id_ed25519
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_ed25519
git config --global user.name "GitHub Action"
git config --global user.email "community@gbdev.io"
- git add .
- git commit -m "Create RGBDS ${GITHUB_REF} documentation"
+ git add -A
+ git commit -m "Create RGBDS ${GITHUB_REF##*/} documentation"
if git remote | grep -q origin; then
- git remote set-url origin git@github.com:gbdev/rgbds-www.git
+ git remote set-url origin git@github.com:${{ github.repository_owner }}/rgbds-www.git
else
- git remote add origin git@github.com:gbdev/rgbds-www.git
+ git remote add origin git@github.com:${{ github.repository_owner }}/rgbds-www.git
fi
git push origin master