This repository has been archived by the owner on May 4, 2024. It is now read-only.
Add auto documentation #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use Ubuntu 22.04 & Node 18 | |
name: Deploy documentations | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- main | |
jobs: | |
backend: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: backend | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Print file name | |
run: echo ${{ format('{0}/backend', github.ref_name) }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Build documentation | |
run: npm run doc | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "./documentation/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Archive artifact | |
run: tar --dereference --hard-dereference -cvf "$RUNNER_TEMP/artifact.tar" ./documentation/ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
name: ${{ format('{0}/backend', github.ref_name) }} | |
path: ${{ runner.temp }}/artifact.tar | |
retention-days: 1 |