Skip to content

Deploy to GitHub Pages (DEV Version) #127

Deploy to GitHub Pages (DEV Version)

Deploy to GitHub Pages (DEV Version) #127

name: Deploy to GitHub Pages (DEV Version)
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1-4'
permissions:
contents: write
jobs:
deploy:
name: Deploy to GitHub Pages (DEV only)
runs-on: ubuntu-latest
container:
image: node:18.12.1
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3
- name: Install rsync
run: |
apt-get update && apt-get install -y rsync
- uses: ./.github/workflows/actions/install
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://code.siemens.com/api/v4/projects/249177/packages/npm/'
scope: '@siemens'
always-auth: 'true'
- name: 'Download @siemens/ix-brand-theme'
env:
TOKEN: ${{ secrets.READ_CSC_TOKEN }}
run: |
PIPELINE_ROOT_DIR=$(pwd)
mkdir .tmp-brand
cd .tmp-brand
curl https://code.siemens.com/api/v4/projects/249177/packages/npm/@siemens/ix-brand-theme/-/@siemens/ix-brand-theme-2.0.0.tgz -H "Authorization: Bearer $TOKEN" --output theme.tgz
tar -xvzf theme.tgz -C $PIPELINE_ROOT_DIR/node_modules/@siemens
cd $PIPELINE_ROOT_DIR/node_modules/@siemens
mv package ix-brand-theme
cd $PIPELINE_ROOT_DIR
cp -R ./node_modules/@siemens/ix-brand-theme ./packages/html-test-app/src/public/additional-theme
- name: 'Build documentation for dev instance'
uses: ./.github/workflows/actions/build
env:
BASE_URL: /version-dev/
FIGMA_API_TOKEN: ${{ secrets.FIGMA_API_TOKEN }}
with:
filter: 'documentation'
args: '--force'
- name: Deploy dev instance 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./packages/documentation/build
target-folder: version-dev
clean-exclude: version-*