New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add deploy workflow for docs site #15894
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Docs Deploy' | ||
|
||
on: | ||
release: | ||
types: ['published'] | ||
|
||
jobs: | ||
deploy: | ||
name: 'Deploy' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- run: cd docs | ||
- name: Install Packages | ||
run: npm install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that this won't work as expected, because every step starts from the initial directory, so We could use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah interesting. I’ll fix that. |
||
- name: Build Site | ||
run: npm run build | ||
- name: Deploy to Netlify | ||
run: npx netlify deploy --dir=_site --message='Docs deploy ${{ github.event.release.tag_name }}' | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_DEPLOY_TO_PROD: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't figure out from the docs whether this includes pre-releases, which we probably wouldn't want. Either way, that doesn't seem important at this moment.