-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github action to deploy to pages
- Loading branch information
1 parent
5c10358
commit 1d5b472
Showing
2 changed files
with
74 additions
and
0 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,37 @@ | ||
name: Build and Deploy to Github Pages | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_only: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# The checkout action doesn't provide a way to get all commit history for a single branch | ||
# So we use the magic number 2147483647 here which means infinite depth for git fetch | ||
# See https://github.com/actions/checkout/issues/520, https://stackoverflow.com/a/6802238 | ||
# this is so that last-modified-at plugin can use the git history to determine the last modified date | ||
fetch-depth: 2147483647 | ||
# Use GitHub Actions' cache to cache dependencies on servers | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.asdf/** | ||
vendor/bundle | ||
key: ${{ runner.os }}-cache-${{ hashFiles('**/cache.key') }} | ||
restore-keys: | | ||
${{ runner.os }}-cache- | ||
- name: Build | ||
uses: actions/jekyll-build-pages@v1 | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: adsabs.github.io_site |
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,37 @@ | ||
name: Build and Deploy to Github Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# The checkout action doesn't provide a way to get all commit history for a single branch | ||
# So we use the magic number 2147483647 here which means infinite depth for git fetch | ||
# See https://github.com/actions/checkout/issues/520, https://stackoverflow.com/a/6802238 | ||
# this is so that last-modified-at plugin can use the git history to determine the last modified date | ||
fetch-depth: 2147483647 | ||
|
||
# Use GitHub Actions' cache to cache dependencies on servers | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.asdf/** | ||
vendor/bundle | ||
key: ${{ runner.os }}-cache-${{ hashFiles('**/cache.key') }} | ||
restore-keys: | | ||
${{ runner.os }}-cache- | ||
# Use GitHub Deploy Action to build and deploy to Github | ||
- uses: jeffreytse/jekyll-deploy-action@v0.6.0 | ||
with: | ||
provider: 'github' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: 'gh-pages' | ||
jekyll_src: './' | ||
jekyll_cfg: '_config.yml' |