Bump node from 18.17.1-bullseye-slim to 23.4.0-bullseye-slim #1209
Workflow file for this run
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: π Deploy docs | |
on: | |
release: | |
branches: | |
- master | |
types: | |
- published | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: π Deploy docs | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: π Gather branch information | |
id: version_info | |
continue-on-error: true | |
run: | | |
version=${GITHUB_REF##*/} | |
echo "##[set-output name=version;]${version}" | |
echo "We're running on version ${version}" | |
- name: π οΈ Append the current version to the introduction document | |
run: | | |
sed -i "1 s|$| ${{ steps.version_info.outputs.version }}|" apidoc/introduction.md | |
- name: ππΌ Run apidoc | |
run: | | |
npx [email protected] -i . -f js -e node_modules | |
- name: π Deploy apidocs for git tags | |
if: ${{ github.event_name == 'release' && github.event.action == 'published' }} | |
run: | | |
set -e | |
# reset the changes to please git | |
git checkout -- apidoc/introduction.md | |
# checkout gh-pages branch | |
git remote set-branches --add origin gh-pages | |
git fetch | |
git checkout -t origin/gh-pages | |
# delete everything except for the doc folder | |
find . ! \( -path './.git' -prune \) ! \( -path './doc' -prune \) ! -name '.' ! -name '..' -print0 | xargs -0 rm -rf -- | |
# move content of doc to . | |
mv doc/* . | |
# delete doc folder | |
rm -rf doc | |
# add .nojekyll file | |
touch .nojekyll | |
# add everything | |
git add -A | |
# tell git who you are | |
git config user.name "GitHub-CI" | |
git config user.email "[email protected]" | |
# commit | |
git commit -m "apidoc build for ${{ steps.version_info.outputs.version }} by GitHub Actions" | |
# push to github | |
git push "https://${{ github.token }}@github.com/${{ github.repository }}.git" gh-pages |