-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: dialtone docsite deployment (#3)
* ci: dialtone docsite deployment * ci: improve pnpm cache
- Loading branch information
1 parent
2258663
commit bbbdc4f
Showing
6 changed files
with
216 additions
and
74 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Description | ||
Provide a description of what this pull request is adding, updating, extending, or removing. If this request is addressing an issue, please link to that issue. | ||
|
||
## Pull Request Checklist | ||
|
||
- [ ] Ask the contributors if a similar effort is already in process or has been solved. | ||
- [ ] Review the [contribution guidelines](https://github.com/dialpad/dialtone/blob/staging/.github/CONTRIBUTING.md). | ||
- [ ] Use `staging` as your pull request's base branch. (All PRs using `production` as its base branch will be declined). | ||
- [ ] Ensure all `gulp` scripts successfully compile. | ||
- [ ] Update, remove, or extend all affected documentation. | ||
- [ ] Ensure no private Dialpad links or info are in the code or pull request description (Dialtone is a public repo!). | ||
|
||
## Obligatory GIF (super important!) | ||
![](path/to/gif) |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!--- Please remove any sections that don't apply to this release --> | ||
|
||
## Adds | ||
* [My addition](https://github.com/dialpad/dialtone/pull/PULL_REQUEST_ID) | ||
* Optional additional info about my addition | ||
* Optional additional info about my addition | ||
* [My other addition](https://github.com/dialpad/dialtone/pull/PULL_REQUEST_ID) | ||
* Optional additional info about my addition | ||
* Optional additional info about my addition | ||
|
||
## Updates | ||
* [My update](https://github.com/dialpad/dialtone/pull/PULL_REQUEST_ID) | ||
* Optional additional info about my update | ||
* Optional additional info about my update | ||
* [My other update](https://github.com/dialpad/dialtone/pull/PULL_REQUEST_ID) | ||
* Optional additional info about my update | ||
* Optional additional info about my update | ||
|
||
## Fixes | ||
* [My fix](https://github.com/dialpad/dialtone/pull/PULL_REQUEST_ID) | ||
* [My other fix](https://github.com/dialpad/dialtone/pull/PULL_REQUEST_ID) |
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
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- production | ||
- alpha | ||
- beta | ||
- staging | ||
paths: | ||
- 'packages/dialtone/**' | ||
|
||
env: | ||
HUSKY: 0 | ||
|
||
jobs: | ||
deploy: | ||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [ 18 ] | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
|
||
- name: parse branch from ref | ||
id: branch | ||
run: echo ::set-output name=BRANCH::${GITHUB_REF/refs\/heads\//} | ||
|
||
# Will prevent the rest of the steps from running on fail | ||
- name: Check if user is a dialpad member | ||
uses: octokit/request-action@v2.1.0 | ||
with: | ||
route: GET /orgs/dialpad/members/${{ github.actor }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DIALTONE_CI_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Build library and docsite (Staging) | ||
if: ${{ github.ref == 'refs/heads/staging' }} | ||
run: npx nx run --verbose dialtone:build-docs -- --deploySubdir /design-system/staging/ | ||
|
||
- name: Deploy to GitHub Pages (Staging) | ||
if: ${{ github.ref == 'refs/heads/staging' }} | ||
uses: JamesIves/github-pages-deploy-action@v4.2.5 | ||
with: | ||
branch: gh-pages | ||
folder: packages/dialtone/docs/.vuepress/dist | ||
target-folder: staging | ||
|
||
- name: Build library and docsite (Next) | ||
if: ${{ github.ref == 'refs/heads/next' }} | ||
run: npx nx run --verbose dialtone:build-docs -- --deploySubdir /design-system/next/ | ||
|
||
- name: Deploy to GitHub Pages (Next) | ||
if: ${{ github.ref == 'refs/heads/next' }} | ||
uses: JamesIves/github-pages-deploy-action@v4.2.5 | ||
with: | ||
branch: gh-pages | ||
folder: packages/dialtone/docs/.vuepress/dist | ||
target-folder: next | ||
|
||
- name: Build library and docsite (Legacy) | ||
if: ${{ github.ref == 'refs/heads/legacy' }} | ||
run: npx nx run --verbose dialtone:build-docs -- --deploySubdir /design-system/legacy/ | ||
|
||
- name: Deploy to GitHub Pages (Legacy) | ||
if: ${{ github.ref == 'refs/heads/legacy' }} | ||
uses: JamesIves/github-pages-deploy-action@v4.2.5 | ||
with: | ||
branch: gh-pages | ||
folder: packages/dialtone/docs/.vuepress/dist | ||
target-folder: legacy | ||
|
||
- name: Build library and docsite | ||
if: ${{ github.ref == 'refs/heads/production' }} | ||
run: npx nx run --verbose dialtone:build-docs -- --deploySubdir /design-system/ | ||
|
||
- name: Deploy to GitHub Pages | ||
if: ${{ github.ref == 'refs/heads/production' }} | ||
uses: JamesIves/github-pages-deploy-action@v4.2.5 | ||
with: | ||
branch: gh-pages | ||
folder: packages/dialtone/docs/.vuepress/dist | ||
clean-exclude: | | ||
deploy-previews | ||
legacy | ||
staging | ||
next |
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
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