From 2945723807b5282394c8212883a7b28aacb470fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 16:09:22 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=91=B7=20Add=20preview=20docs=20GitHub=20A?= =?utf8?q?ction?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview-docs.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/preview-docs.yml diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml new file mode 100644 index 00000000..e335e81f --- /dev/null +++ b/.github/workflows/preview-docs.yml @@ -0,0 +1,41 @@ +name: Preview Docs +on: + workflow_run: + workflows: + - Build Docs + types: + - completed + +jobs: + preview-docs: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Download Artifact Docs + uses: dawidd6/action-download-artifact@v2.9.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: build-docs.yml + run_id: ${{ github.event.workflow_run.id }} + name: docs-zip + - name: Unzip docs + run: | + rm -rf ./site + unzip docs.zip + rm -f docs.zip + - name: Deploy to Netlify + id: netlify + uses: nwtgck/actions-netlify@v1.1.5 + with: + publish-dir: './site' + production-deploy: false + github-token: ${{ secrets.GITHUB_TOKEN }} + enable-commit-comment: false + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + - name: Comment Deploy + uses: ./.github/actions/comment-docs-preview-in-pr + with: + token: ${{ secrets.GITHUB_TOKEN }} + deploy_url: "${{ steps.netlify.outputs.deploy-url }}" -- 2.47.2