Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy Docs
on:
push:
branches:
- main
jobs:
docs:
name: Deploy Docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node v15
uses: actions/setup-node@v1
with:
node-version: 15

- name: Install pnpm
run: curl -L https://unpkg.com/@pnpm/self-installer | node

- name: Use node_modules cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Install deps
run: pnpm i

- name: Build the code
run: pnpm run build

- name: Build the docs
run: pnpm run docs

- name: Commit the Docs
uses: cpina/github-action-push-to-another-repository@master
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'doc'
destination-github-username: 'github-actions[bot]'
destination-repository-username: "cordis-lib"
destination-repository-name: 'cordis-lib.github.io'
target-branch: 'main'
user-email: 41898282+github-actions[bot]@users.noreply.github.com