mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 19:09:36 +00:00
Clean up docs workflows
Usethe `ubuntu-slim` runner to (hopefully) get faster setup times
This commit is contained in:
@@ -7,21 +7,23 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository_owner == 'gbdev'
|
if: github.repository_owner == 'gbdev'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-slim
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout rgbds@release
|
- name: Checkout rgbds@release
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
path: rgbds
|
path: rgbds
|
||||||
- name: Checkout rgbds-www@master
|
sparse-checkout: man # Avoid checking out other files, we don't use them here.
|
||||||
|
- name: Checkout rgbds-www
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository_owner }}/rgbds-www
|
|
||||||
path: rgbds-www
|
path: rgbds-www
|
||||||
|
repository: ${{ github.repository_owner }}/rgbds-www
|
||||||
|
ref: master # Need to check out the branch to be able to commit on and push it.
|
||||||
|
ssh-key: !!str ${{ secrets.SSH_KEY_SECRET }}
|
||||||
- name: Install groff and mandoc
|
- name: Install groff and mandoc
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq update
|
sudo apt install -Uyq groff mandoc -o APT::Color=yes -o Acquire::Queue-Mode
|
||||||
sudo apt-get install -yq groff mandoc
|
|
||||||
- name: Update pages
|
- name: Update pages
|
||||||
working-directory: rgbds/man
|
working-directory: rgbds/man
|
||||||
run: | # The ref appears to be in the format "refs/tags/<version>", so strip that
|
run: | # The ref appears to be in the format "refs/tags/<version>", so strip that
|
||||||
@@ -29,19 +31,12 @@ jobs:
|
|||||||
../../rgbds-www/maintainer/new_release.sh ${GITHUB_REF##*/}
|
../../rgbds-www/maintainer/new_release.sh ${GITHUB_REF##*/}
|
||||||
- name: Push new pages
|
- name: Push new pages
|
||||||
working-directory: rgbds-www
|
working-directory: rgbds-www
|
||||||
|
env:
|
||||||
|
GIT_AUTHOR_NAME: !!str ${{ github.actor }}
|
||||||
|
GIT_AUTHOR_EMAIL: !!str ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
|
||||||
|
GIT_COMMITTER_NAME: github-actions[bot]
|
||||||
|
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
run: |
|
run: |
|
||||||
mkdir -p -m 700 ~/.ssh
|
|
||||||
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 -A
|
git add -A
|
||||||
git commit -m "Create RGBDS ${GITHUB_REF##*/} documentation"
|
git commit -m "Create RGBDS ${GITHUB_REF##*/} documentation"
|
||||||
if git remote | grep -q origin; then
|
git push
|
||||||
git remote set-url origin git@github.com:${{ github.repository_owner }}/rgbds-www.git
|
|
||||||
else
|
|
||||||
git remote add origin git@github.com:${{ github.repository_owner }}/rgbds-www.git
|
|
||||||
fi
|
|
||||||
git push origin master
|
|
||||||
|
|||||||
@@ -4,57 +4,41 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- man/gbz80.7
|
- man/*
|
||||||
- man/rgbds.5
|
workflow_dispatch:
|
||||||
- man/rgbds.7
|
|
||||||
- man/rgbasm.1
|
|
||||||
- man/rgbasm.5
|
|
||||||
- man/rgbasm-old.5
|
|
||||||
- man/rgblink.1
|
|
||||||
- man/rgblink.5
|
|
||||||
- man/rgbfix.1
|
|
||||||
- man/rgbgfx.1
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository_owner == 'gbdev'
|
if: github.repository_owner == 'gbdev'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-slim
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout rgbds@master
|
- name: Checkout rgbds
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
repository: gbdev/rgbds
|
|
||||||
ref: master
|
|
||||||
path: rgbds
|
path: rgbds
|
||||||
- name: Checkout rgbds-www@master
|
sparse-checkout: man # Avoid checking out other files, we don't use them here.
|
||||||
|
- name: Checkout rgbds-www
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
repository: gbdev/rgbds-www
|
|
||||||
ref: master
|
|
||||||
path: rgbds-www
|
path: rgbds-www
|
||||||
|
repository: ${{ github.repository_owner }}/rgbds-www
|
||||||
|
ref: master # Need to check out the branch to be able to commit on and push it.
|
||||||
|
ssh-key: !!str ${{ secrets.SSH_KEY_SECRET }}
|
||||||
- name: Install groff and mandoc
|
- name: Install groff and mandoc
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq update
|
sudo apt install -Uyq groff mandoc -o APT::Color=yes -o Acquire::Queue-Mode=access
|
||||||
sudo apt-get install -yq groff mandoc
|
|
||||||
- name: Update pages
|
- name: Update pages
|
||||||
working-directory: rgbds/man
|
working-directory: rgbds/man
|
||||||
run: |
|
run: |
|
||||||
../../rgbds-www/maintainer/man_to_html.sh master *
|
../../rgbds-www/maintainer/man_to_html.sh master *
|
||||||
- name: Push new pages
|
- name: Push new pages
|
||||||
working-directory: rgbds-www
|
working-directory: rgbds-www
|
||||||
|
env:
|
||||||
|
GIT_AUTHOR_NAME: !!str ${{ github.actor }}
|
||||||
|
GIT_AUTHOR_EMAIL: !!str ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
|
||||||
|
GIT_COMMITTER_NAME: github-actions[bot]
|
||||||
|
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
run: |
|
run: |
|
||||||
mkdir -p -m 700 ~/.ssh
|
|
||||||
echo "${{ secrets.SSH_KEY_SECRET }}" > ~/.ssh/id_ed25519
|
|
||||||
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 -A
|
git add -A
|
||||||
git commit -m "Update RGBDS master documentation"
|
git commit -m "Update RGBDS master documentation"
|
||||||
if git remote | grep -q origin; then
|
git push
|
||||||
git remote set-url origin git@github.com:gbdev/rgbds-www.git
|
|
||||||
else
|
|
||||||
git remote add origin git@github.com:gbdev/rgbds-www.git
|
|
||||||
fi
|
|
||||||
git push origin master
|
|
||||||
|
|||||||
Reference in New Issue
Block a user