Skip to content

[ci] Fix deployment 2 #180

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,29 @@ jobs:
haxelib install CodeCookBook-neko.hxml --always --quiet
haxelib install highlighting.hxml --always --quiet
haxelib list

- name: Check out gh-pages branch
uses: actions/checkout@v4
with:
ref: 'gh-pages'
path: ./output
fetch-depth: 0

- name: Prepare output directory
run:
rm -r ./output/*

- name: Generate website
run: |
haxe CodeCookBook-neko.hxml
haxe highlighting.hxml

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./output
- name: Deploy to gh-pages branch
if: github.ref == 'refs/heads/master'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Deploy to GitHub Pages from $GITHUB_SHA"
git push
working-directory: ./output
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

41 changes: 0 additions & 41 deletions deploy.sh

This file was deleted.

Loading