From 4aa9f99beaeca07af9291c7d535788fbf14224e3 Mon Sep 17 00:00:00 2001 From: Jey Puget Gil Date: Fri, 12 Jan 2024 15:36:14 +0100 Subject: [PATCH 1/2] Generate documentation with Github Actions --- .github/workflows/generate-documentation.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate-documentation.yml b/.github/workflows/generate-documentation.yml index bc0e993f5..7809a4403 100644 --- a/.github/workflows/generate-documentation.yml +++ b/.github/workflows/generate-documentation.yml @@ -5,7 +5,7 @@ name: Node.js CI on: push: - branches: ['master'] + branches: ['github-actions'] jobs: build: @@ -16,25 +16,25 @@ jobs: node-version: ['18.x'] steps: - - name: Checkout docs branch + - name: Checkout master branch uses: actions/checkout@v4 with: - ref: docs - # reset on master branch - - name: Reset master branch last commit - run: git reset origin/master --hard + ref: master - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' # generate the documentation + - run: npm install - run: npm run docs # commit and push the changes on the docs branch - name: Commit docs changes run: | + git checkout -b docs git config --global user.name 'VCity Github Action' git config --global user.email 'vcity@liris.cnrs.fr' git add . git commit -m "Documentation update" - git push origin docs + git push --set-upstream origin docs --force + From ab062d4f1db9054e612b8243ab4ef918458be00b Mon Sep 17 00:00:00 2001 From: Jey Puget Gil Date: Fri, 12 Jan 2024 15:44:05 +0100 Subject: [PATCH 2/2] Created Documentation Github Action --- .github/workflows/generate-documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-documentation.yml b/.github/workflows/generate-documentation.yml index 7809a4403..a1ad150f9 100644 --- a/.github/workflows/generate-documentation.yml +++ b/.github/workflows/generate-documentation.yml @@ -5,7 +5,7 @@ name: Node.js CI on: push: - branches: ['github-actions'] + branches: ['master'] jobs: build: