From 87da533d52fe52e8b6d8d56f1389672be87a0dc9 Mon Sep 17 00:00:00 2001 From: "Zaid \"Nico" Date: Fri, 26 Feb 2021 19:37:42 -0500 Subject: [PATCH 1/2] add docs workflow --- .github/workflows/docs.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..286dd67 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,48 @@ +name: Deploy Docs +on: + push: + branches: + - master +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 + From bfcea76d0d667c74049f23991363753b79dcfb9e Mon Sep 17 00:00:00 2001 From: Zaid Date: Sat, 27 Feb 2021 07:12:17 -0500 Subject: [PATCH 2/2] Update .github/workflows/docs.yml Co-authored-by: didinele --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 286dd67..bc1a616 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ name: Deploy Docs on: push: branches: - - master + - main jobs: docs: name: Deploy Docs @@ -45,4 +45,3 @@ jobs: destination-repository-name: 'cordis-lib.github.io' target-branch: 'main' user-email: 41898282+github-actions[bot]@users.noreply.github.com -