Skip to content

docs-generate-deploy-manually #6

docs-generate-deploy-manually

docs-generate-deploy-manually #6

name: docs-generate-deploy-manually
on:
workflow_dispatch:
jobs:
compile-prod:
runs-on: ubuntu-latest
steps:
- name: Checkout branch main
uses: actions/checkout@v3
with:
ref: main
- name: Install project dependencies
run: npm install
- name: Compile Production code
run: npm run build
- name: Sign and commit compiled code to branch main
uses: ./.github/os-git-actions/signed-commit/
with:
branch: main
message: 'Compiled Production Mode [skip ci]'
newFiles: true
gpgPriv: ${{ secrets.GPG_SIGN_KEY }}
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }}
update-doc:
needs: compile-prod
runs-on: ubuntu-latest
steps:
- name: Checkout branch main
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.PAT }}
- uses: actions/setup-node@v3
- name: Install project dependencies
run: npm install
- name: Install graphviz
run: sudo apt install -y graphviz
- name: Generate documentation
run: npm run docs
- name: Sign and commit documentation to branch main
uses: ./.github/os-git-actions/signed-commit/
with:
branch: main
message: 'Update documentation [skip ci]'
newFiles: true
gpgPriv: ${{ secrets.GPG_SIGN_KEY }}
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }}
deploy-doc:
needs: update-doc
runs-on: ubuntu-latest
steps:
- name: Checkout branch main
uses: actions/checkout@v3
with:
ref: main
- uses: actions/setup-node@v3
- name: Push documentation into github page
uses: GuillaumeFalourd/copy-push-files@v1
with:
source_files: docs/*
remote_repository: https://github.com/outsystems-ui-docs/outsystems-ui-docs.github.io
access_token: ${{ secrets.UICOMPONENTSDOCS }}
target_branch: main
commit_message: Deploy documentation.