Update path #7
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
name: Build YSYX Docs | |
on: | |
workflow_dispatch: # Allows manual triggering of the workflow | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ysyx-docs-content | |
uses: actions/checkout@v4 | |
with: | |
repository: oscc-web/ysyx-docs-content | |
path: ysyx-docs-content | |
- name: Get changed files in the ysyx-docs-content repo | |
id: changed-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
since_last_remote_commit: true | |
path: ysyx-docs-content | |
- name: Checkout ysyx-docs | |
uses: actions/checkout@v4 | |
with: | |
repository: oscc-web/ysyx-docs | |
path: ysyx-docs | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
cache-dependency-path: ysyx-docs/package*.json | |
- name: Install Dependencies | |
working-directory: ysyx-docs | |
run: | | |
npm ci | |
- name: List all changed files | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: | | |
for file in ${ALL_CHANGED_FILES}; do | |
echo "$file was changed" | |
done | |
- name: Test doc building | |
working-directory: ysyx-docs | |
run: | | |
npm run build |