name: Preview Docs on: workflow_dispatch: inputs: pr: description: Pull Request number required: true name: description: Artifact name for zip file with docs required: true commit: description: Commit SHA hash required: true jobs: deploy: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - uses: ./.github/actions/get-artifact with: token: ${{ secrets.GITHUB_TOKEN }} name: ${{ github.event.inputs.name }} path: ./archive.zip - name: Unzip docs run: bash ./scripts/unzip-docs.sh - 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 env: PR: "${{ github.event.inputs.pr }}" DEPLOY_URL: "${{ steps.netlify.outputs.deploy-url }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" COMMIT: "${{ github.event.inputs.commit }}" run: bash ./scripts/docs-comment-deploy.sh