Merge pull request #189 from IBM/work/IVSC-2225 #75
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 Developer Docs Site | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Install packages | |
run: npm ci --legacy-peer-deps | |
- name: Gatsby Cache Folder | |
uses: actions/cache@v3 | |
id: gatsby-cache-folder | |
with: | |
path: .cache | |
key: ${{ runner.os }}-cache-gatsby | |
restore-keys: | | |
${{ runner.os }}-cache-gatsby | |
- name: Gatsby Public Folder | |
uses: actions/cache@v3 | |
id: gatsby-public-folder | |
with: | |
path: public/ | |
key: ${{ runner.os }}-public-gatsby | |
restore-keys: | | |
${{ runner.os }}-public-gatsby | |
- name: Build site | |
run: npm run build | |
- name: Add CNAME record | |
run: | | |
echo 'developers.video.ibm.com' > public/CNAME | |
- name: Deploy | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npx gh-pages -d public -u "github-actions <[email protected]>" | |
env: | |
GITHUB_TOKEN: ${{ secrets.DEV_DOCS_TOKEN }} |