Skip to content

Merge pull request #174 from CoolBitX-Technology/dependabot/npm_and_y… #15

Merge pull request #174 from CoolBitX-Technology/dependabot/npm_and_y…

Merge pull request #174 from CoolBitX-Technology/dependabot/npm_and_y… #15

Workflow file for this run

name: Build API doc and Sygna Configurator
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build API Doc with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
- name: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.prefix }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.prefix }}-
- name: Setup Node.js
uses: actions/setup-node@main
with:
node-version: "20"
registry-url: "https://npm.pkg.github.com"
- name: Install npm dependencies
run: |
cd ./sygna-hub-configurator
npm ci
- name: Build Sygna Configurator
run: |
cd ./sygna-hub-configurator
npm run build
- name: Copy Static Files
run: |
mkdir -p deploy
cp ./swagger.yaml ./deploy
cp ./_site/index.html ./deploy
cp -r ./_site/dist ./deploy
cp -r ./sygna-hub-configurator/dist/spa ./deploy/configurator
- name: Push to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./deploy