-
Notifications
You must be signed in to change notification settings - Fork 91
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
Switch GitHub Pages deployment method/source to GitHub Actions #325
Changes from all 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ on: | |
types: [opened, synchronize] | ||
|
||
jobs: | ||
documentation: | ||
build-documentation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -55,13 +55,22 @@ jobs: | |
env: | ||
EARTHDATA_USERNAME: ${{ secrets.EDL_USERNAME }} | ||
EARTHDATA_PASSWORD: ${{ secrets.EDL_PASSWORD }} | ||
|
||
- name: Deploy | ||
if: | | ||
github.event_name == 'push' | ||
&& (github.ref == 'refs/heads/main' || github.ref == 'ref/heads/documentation') | ||
&& github.repository == 'nsidc/earthaccess' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
- name: Upload site artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site | ||
path: ./site | ||
|
||
deploy-documentation: | ||
if: | | ||
github.event_name == 'push' | ||
&& (github.ref == 'refs/heads/main' || github.ref == 'ref/heads/documentation') | ||
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. Where's the 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 don't know, honestly. It was based on stuff that was already here. @betolink ? 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. oh yeah, originally I was thinking about having that branch to test changes to the docs without having to deploy main. |
||
&& github.repository == 'nsidc/earthaccess' | ||
runs-on: ubuntu-latest | ||
needs: build-documentation | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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.
Looks like there's a
v2
release for this action (and thedeploy-pages@
one too). Any reason to usev1
overv2
?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.
Nope, was just lack of awareness and copy/pasting :)