-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
f01dab1e
committed
Nov 23, 2023
1 parent
f405725
commit 8c86e4b
Showing
1 changed file
with
27 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,28 +31,28 @@ jobs: | |
const docsChanged = files.some(file => file.filename.startsWith('docs/')); | ||
return docsChanged; | ||
- name: Add label if not present | ||
if: steps.check-labels.outputs.result == 'true' | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const labels = context.payload.pull_request.labels.map(label => label.name); | ||
if (!labels.includes('documentation')) { | ||
github.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.issue.number, | ||
labels: ['documentation'] | ||
}) | ||
} | ||
# - name: Add label if not present | ||
# if: steps.check-labels.outputs.result == 'true' | ||
# uses: actions/github-script@v3 | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# script: | | ||
# const labels = context.payload.pull_request.labels.map(label => label.name); | ||
# if (!labels.includes('documentation')) { | ||
# github.issues.addLabels({ | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# issue_number: context.issue.number, | ||
# labels: ['documentation'] | ||
# }) | ||
# } | ||
|
||
build_and_deploy_preview: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
needs: add_label | ||
if: needs.add_label.outputs.has_label == 'true' | ||
# if: needs.add_label.outputs.has_label == 'true' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
@@ -105,14 +105,14 @@ jobs: | |
with: | ||
args: './docs/build' | ||
|
||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: './docs/build' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
enable-github-deployment: false | ||
deploy-message: "Deploy from GitHub Actions for PR ${{ github.event.number }}" | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 | ||
# - name: Deploy to Netlify | ||
# uses: nwtgck/[email protected] | ||
# with: | ||
# publish-dir: './docs/build' | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# enable-github-deployment: false | ||
# deploy-message: "Deploy from GitHub Actions for PR ${{ github.event.number }}" | ||
# env: | ||
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
# timeout-minutes: 1 |