-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/1.1.0_releaseCandidate
- Loading branch information
Showing
5 changed files
with
49 additions
and
4 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,44 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 15.0.1 | ||
- name: Install dependencies | ||
run: | | ||
cd cookbook | ||
set -v | ||
pwd | ||
npm install | ||
npm gatsby --version | ||
npm run build | ||
echo Site built and ready to deploy! | ||
- name: Deploy to Github packages | ||
# only deploy when pushing to main | ||
if: ${{(github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.ref_name == 'main'}} | ||
run: | | ||
cd cookbook/public | ||
git config --global init.defaultBranch main | ||
pwd | ||
set -v | ||
git init | ||
git config user.name ${{ github.actor }} | ||
git config user.email ${{ github.actor }}@users.noreply.github.com | ||
git add . | ||
echo 'Add completed'. | ||
git commit -m "Deploy commit: ${{ github.sha }}" | ||
echo 'Commit completed.' | ||
git push -f https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git main:gh-pages | ||
echo 'Finished deploying the 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
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