up workflow using github runners #206
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: CI | |
on: | |
push: | |
branches: | |
- main | |
repository_dispatch: | |
types: [stages-updates] | |
jobs: | |
activate: | |
runs-on: ubuntu-latest | |
if: | | |
github.repository == 'master-csmi/csmi' && | |
!startsWith(github.event.head_commit.message, 'Release ') && | |
!contains(github.event.head_commit.message, 'ci skip') | |
steps: | |
- run: echo ok go | |
docs: | |
if: "!contains(github.event.head_commit.message, 'doc skip')" | |
needs: activate | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- run: npm install | |
- name: Install credentials | |
run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials | |
env: | |
GITHUB_OAUTH: ${{ secrets.CR_PAT }} | |
- name: Build | |
run: npm run antora | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages # The branch the action should deploy to. | |
folder: public # The folder the action should deploy. | |