1.21.3 #180
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: Publish docs | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
concurrency: | |
group: publish-docs | |
cancel-in-progress: true | |
jobs: | |
publish: | |
name: Publish docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Earthly | |
uses: earthly/actions-setup@v1 | |
with: | |
version: latest | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker login # to avoid dockerhub rate-limiting | |
run: docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" | |
- name: Setup git | |
run: | | |
git config --global user.name "GraphQL-Markdown bot" | |
git config --global user.email "graphql-markdown-bot@edno.io" | |
- name: Checkout package repo | |
uses: actions/checkout@v4 | |
with: | |
path: package | |
token: ${{ secrets.BOT_PAT }} | |
- name: Checkout website repo | |
uses: actions/checkout@v4 | |
with: | |
repository: graphql-markdown/graphql-markdown.github.io | |
path: website | |
token: ${{ secrets.BOT_PAT }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
cache-dependency-path: package/package-lock.json | |
- name: Build docs | |
run: | | |
cd package | |
npm ci | |
npm run docs:api | |
earthly --build-arg VERSION=3 +build-docs | |
- name: Push changes to website repo | |
run: | | |
cp -Rf package/build/** website/ | |
cd website | |
git add --all | |
git commit -am ":memo: update documentation ($GITHUB_SHA)" | |
git push |