Skip to content

Merge pull request #165 from IBM/dependabot/npm_and_yarn/follow-redir… #63

Merge pull request #165 from IBM/dependabot/npm_and_yarn/follow-redir…

Merge pull request #165 from IBM/dependabot/npm_and_yarn/follow-redir… #63

Workflow file for this run

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 }}