generated from itw-creative-works/ultimate-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
306 additions
and
251 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 |
---|---|---|
|
@@ -23,6 +23,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 80 | ||
steps: | ||
- name: Setup git config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "$GITHUB_ACTOR" | ||
- name: Checkout main branch | ||
uses: actions/checkout@v3 | ||
- name: Setup ruby | ||
|
@@ -49,34 +53,36 @@ jobs: | |
echo "Dependencies: " | ||
npm list --depth=0 || echo "" | ||
- name: Run node build | ||
run: npm run build -- --buildLocation='server' --skipJekyll='true' | ||
run: npm run build -- --buildLocation='server' | ||
- name: Create build.json | ||
run: | | ||
export TZ=UTC date | ||
timestamp_utc=$(date +%FT%TZ) | ||
export TZ=America/Los_Angeles date | ||
timestamp_pst=$(date +%FT%TZ) | ||
timestamp=$(date +%FT%TZ) | ||
temp_build_json=$(cat @output/build/build.json) | ||
echo account: $GITHUB_ACTOR | ||
echo repo: $GITHUB_REPOSITORY | ||
echo timestamp_utc: $timestamp_utc | ||
echo timestamp_pst: $timestamp_pst | ||
echo timestamp: $timestamp | ||
echo build.json: $temp_build_json | ||
build_log_path="@output/build/build.json" | ||
sed "s/%TIMESTAMP_UTC_GHP%/$timestamp_utc/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path | ||
sed "s/%TIMESTAMP_PST_GHP%/$timestamp_pst/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path | ||
sed "s/%GHP_TIMESTAMP%/$timestamp/g" $build_log_path > "$build_log_path"-temp && mv "$build_log_path"-temp $build_log_path | ||
sed -n '1h;1!H;${;g;s/GEN>>>.*<<<GEN/<REDACTED FOR LIVE PUBLISH>/g;p;}' .gitignore > .gitignore | ||
- name: Build Jekyll | ||
uses: helaili/jekyll-action@v2 | ||
env: | ||
JEKYLL_PAT: ${{ secrets.GH_TOKEN }} | ||
- name: Purge CloudFlare Cache | ||
- name: Delete gh-pages branch | ||
uses: dawidd6/action-delete-branch@v3 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
branches: gh-pages | ||
- name: Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
publish_dir: ./_site | ||
- name: Purge CloudFlare cache | ||
run: npm run cloudflare:purge | ||
- name: Purge Artifacts | ||
- name: Purge artifacts | ||
uses: kolpav/purge-artifacts-action@v1 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
expire-in: 0 # Set this to 0 to delete all artifacts | ||
expire-in: 0 # Set this to 0 to delete all artifacts |
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
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
Oops, something went wrong.