Skip to content

master

master #21

Workflow file for this run

name: CI Deploy
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout SDK
uses: actions/checkout@v3
with:
token: ${{ secrets.RELEASE_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Deploy
run: |
node scripts/download-changelogs.mjs
mkdir -p $HOME/.ssh
ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
echo "$GITHUB_PRIVATE_KEY" > $HOME/.ssh/id_rsa
chmod 0600 $HOME/.ssh/id_rsa
cd website
npm i
npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/build/cleverpush-developer-docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ${{ vars.SLACK_CHANNEL }}
status: FAILED
color: danger