mirror of
https://github.com/sass/sass.git
synced 2024-09-21 10:37:22 +00:00
Automatically redeploy the website whenever js-api-docs changes (#3178)
This commit is contained in:
parent
6fa1678aa2
commit
8e571ac5ee
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@ -61,3 +61,28 @@ jobs:
|
||||
with: {node-version: '${{ env.NODE_VERSION }}'}
|
||||
- run: npm ci
|
||||
- run: npm run typedoc
|
||||
|
||||
# Whenever anything changes in js-api-docs, redeploy the website so it picks
|
||||
# up those changes.
|
||||
heroku:
|
||||
name: Deploy sass-lang.com
|
||||
runs-on: ubuntu-latest
|
||||
needs: [static_analysis, js_api_mirroring, typedoc]
|
||||
if: |
|
||||
github.event_name == 'push' &&
|
||||
github.repository == 'sass/sass' &&
|
||||
github.ref == 'refs/heads/main'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with: {fetch-depth: 0}
|
||||
|
||||
- name: Find changed files in js-api-doc
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@b86b537e2b78397b630cfb1a8d0aec1e03379737
|
||||
with: {path: js-api-doc}
|
||||
|
||||
- name: Deploy
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
run: tool/github-action/deploy-heroku.sh
|
||||
env: {HEROKU_TOKEN: "${{ secrets.HEROKU_TOKEN }}"}
|
||||
|
15
tool/github-action/deploy-heroku.sh
Executable file
15
tool/github-action/deploy-heroku.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash -e
|
||||
# Copyright 2018 Google Inc. Use of this source code is governed by an MIT-style
|
||||
# license that can be found in the LICENSE file or at
|
||||
# https://opensource.org/licenses/MIT.
|
||||
|
||||
curl https://kolkrabbi.heroku.com/apps/98fc74a8-ff56-4a21-85f6-7a1fc8ba95c9/github/push \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json, text/javascript, */*; q=0.01" \
|
||||
-H "Authorization: Bearer $HEROKU_TOKEN" \
|
||||
-H "accept-encoding: gzip, deflate, br" \
|
||||
-H "accept-language: en-US,en;q=0.9" \
|
||||
-H "origin: https://dashboard.heroku.com" \
|
||||
-H "referer: https://dashboard.heroku.com/" \
|
||||
-d '{"branch":"main"}' \
|
||||
--fail --output -
|
Loading…
Reference in New Issue
Block a user