Skip to content

Build & Release

Build & Release #5193

name: Build & Release
on:
push:
branches:
- gatsby
schedule:
- cron: '0 0,8,16 * * *'
env:
CI: true
GATSBY_TELEMETRY_DISABLED: true
jobs:
build-and-release:
name: Build & Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- id: node-cache
uses: actions/cache@v3
with:
path: '~/.npm'
key: ${{ runner.os }}-node18-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node18-
- run: npm -g i npm@latest
- run: npm ci
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm run build
env:
GATSBY_DISQUS_NAME: ${{ secrets.GATSBY_DISQUS_NAME }}
GATSBY_DRAFT_PATH: ${{ secrets.GATSBY_DRAFT_PATH }}
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.GH_PAGES_DEPLOY_KEY }}"
- run: git remote rename origin Ailrun
- run: git remote set-url Ailrun "[email protected]:Ailrun/Ailrun.github.io"
- run: git config --local user.name "Junyoung Clare Jang"
- run: git config --local user.email "[email protected]"
- run: npm run release
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock