File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and publish TED Developer Docs on staging
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - develop
8+
9+ jobs :
10+ publish_site :
11+ name : " Build and publish site with Antora"
12+ runs-on : [ubuntu-latest]
13+ env :
14+ ACTIONS_ALLOW_UNSECURE_COMMANDS : ' true'
15+ NODE_OPTIONS : ' --max-old-space-size=8192'
16+
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+
21+ - name : Setup Node.js for use with actions
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : 18
25+
26+ - name : Install Corepack
27+ run : npm install --prefix .node corepack
28+
29+ - name : Install Yarn
30+ run : .node/node_modules/.bin/corepack enable --install-directory .node
31+
32+ - name : Install packages
33+ run : .node/yarn install
34+
35+ - name : Generate site
36+ run : yarn run build
37+
38+ # Authenticate with GitHub App
39+ - name : Generate GitHub App token
40+ id : app-token
41+ uses : tibdex/github-app-token@v2
42+ with :
43+ app_id : ${{ secrets.APP_ID }}
44+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
45+ installation_id : ${{ secrets.INSTALLATION_ID }}
46+
47+ - name : Deploy staging (develop branch)
48+ if : github.ref == 'refs/heads/develop'
49+ uses : JamesIves/github-pages-deploy-action@v4
50+ with :
51+ repository-name : OP-TED/docs-staging
52+ folder : build/site
53+ branch : gh-pages
54+ token : ${{ steps.app-token.outputs.token }}
55+ commit-message : " [CI] Publish STAGING Docs for ${{ github.sha }}"
You can’t perform that action at this time.
0 commit comments