crazy-max / ghaction-github-pages Goto Github PK
View Code? Open in Web Editor NEWGitHub Action to deploy to GitHub Pages
Home Page: https://github.com/marketplace/actions/github-pages
License: MIT License
GitHub Action to deploy to GitHub Pages
Home Page: https://github.com/marketplace/actions/github-pages
License: MIT License
It seems that github changed something and push to the remote repository stopped working.
Tell me what should happen
Tell me what happens instead
- name: Deploy WebAssembly to other repository GitHub Pages
if: inputs.deploy-web-assembly-path != '' &&
env.CONVENTIONAL-COMMITS-PUBLISH-CONDITIONS == 'true' &&
inputs.deploy-web-assembly-repo != ''
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: ${{ inputs.deploy-web-assembly-path }}
repo: ${{ inputs.deploy-web-assembly-repo }}
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PAT: ${{ secrets.personal-token }}
Download the log file of your build
and attach it to this issue.
Wipes branch by default.
Tell me what should happen
A new push should be created
Tell me what happens instead
A force push destroys the history and the GitHub workflow that ran it!
YML File below.
This needs to have a warning. The action should not destroy the commit history by default. Luckily GitHub support was able to recover my last commit.
Example:
name: Snake
on:
# run automatically every 6 hours
schedule:
- cron: "0 */6 * * *"
# This command allows us to run the Action automatically from the Actions tab.
workflow_dispatch:
push:
branches:
- master
jobs:
generate:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
- name: generate github-contribution-grid-snake.svg
uses: Platane/snk/svg-only@v2
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
snake/github-contribution-grid-snake.svg?color_snake=purple
snake/github-contribution-grid-snake-dark.svg?palette=github-dark&color_snake=purple
# push the content of <build_dir> to a branch
# the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page
- name: push github-contribution-grid-snake.svg to the output branch
uses: crazy-max/[email protected]
with:
target_branch: master
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
https://github.com/Technetium1/Technetium1/actions/runs/2593974297
See also Platane/snk#36
It would be cool to be able to customize a commit message as well as user.email
and user.name
of a committer.
GITHUB_PAT should not use GITHUB_ prefix, it's reserved.
Note: GitHub reserves the GITHUB_ environment variable prefix for internal use by GitHub. Setting an environment variable or secret with the GITHUB_ prefix will result in an error.
When deploying a directory with this action, I am getting the error:
##[error]EEXIST: file already exists, symlink '/home/runner/.cache/bazel/_bazel_runner/17d8e9b30b69e9aeac686c3673f39b5a/execroot/highschool_notes/bazel-out/k8-fastbuild/bin' -> '/tmp/github-pages-vbZ3SF'
For clarification, I am using the bazel buildsystem and pandoc to generate some HTML outputs from LaTeX files. After running, Bazel creates the following symlinks in the workspace directory:
bazel-bin -> /home/runner/.cache/bazel/_bazel_runner/17d8e9b30b69e9aeac686c3673f39b5a/execroot/highschool_notes/bazel-bin
bazel-highschool_notes -> /home/runner/.cache/bazel/_bazel_runner/17d8e9b30b69e9aeac686c3673f39b5a/execroot/highschool_notes/bazel-highschool_notes
bazel-out -> /home/runner/.cache/bazel/_bazel_runner/17d8e9b30b69e9aeac686c3673f39b5a/execroot/highschool_notes/bazel-out
bazel-testlogs -> /home/runner/.cache/bazel/_bazel_runner/17d8e9b30b69e9aeac686c3673f39b5a/execroot/highschool_notes/bazel-testlogs
I would expect that this just deploys as per usual (I have no problems in many other projects)
name: Deploy docs
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: Install pandoc
run: |
sudo apt install pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra -y
- name: Build
run: |
"${GITHUB_WORKSPACE}/bin/bazel" clean
"${GITHUB_WORKSPACE}/bin/bazel" build //:all
- name: Check GitHub Pages status
uses: crazy-max/ghaction-github-status@v1
with:
pages_threshold: major_outage
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: bazel-bin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
With keep_history: true
, deleting a folder does not push file deletions to the remote repository.
Configure action with: keep_history: true
/a/file.txt
/b/file.txt
/a/file.txt
- /b/file.txt
gh_pages repo/branch does not contain directory b/
Directory b/
still present
keep_history: false
)name: "Cleanup Preview"
on:
pull_request:
types: [ closed ]
env:
GITHUB_PR_NUMBER: "${{github.event.number}}"
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Pull release
uses: actions/checkout@v2
with:
repository: ysndr/beta
ref: gh-pages
path: preview
- name: Remove Preview
run: |
ls -la
[ -d preview/${{ env.GITHUB_PR_NUMBER }} ] && rm -r preview/${{ env.GITHUB_PR_NUMBER }}
ls -la
rm -rf preview/.git
- name: Push
uses: crazy-max/ghaction-github-pages@v2
with:
repo: ysndr/beta
target_branch: gh-pages
build_dir: ./preview
committer: github-ci <[email protected]>
verbose: true
keep_history: true
env:
GH_PAT: ${{ secrets.DEPLOY_TOKEN }}
##[debug]Force push
/usr/bin/git push --force ***github.com/asm0dey/kotlin-spring-webinar.git gh-pages
remote: Permission to asm0dey/kotlin-spring-webinar.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/asm0dey/kotlin-spring-webinar.git/': The requested URL returned error: 403
Error: The process '/usr/bin/git' failed with exit code 128
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Deploy pages
should be published successfully
name: Deploy pages
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '19'
- name: Install dependencies
run: npm install
- name: Install slidev
run: npm i -g @slidev/cli
- name: Build
run: slidev build --base kotlin-spring-webinar
- name: Deploy pages
uses: crazy-max/ghaction-github-pages@v3
with:
build_dir: dist
target_branch: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
I may be misinterpretting what keep_history: false
is supposed to do, but it doesn't seem to be doing it, even when I set is explicitly.
It is my understanding that it's supposed to get rid of any old commits on the target branch, so that the target branch only ever has one commit at a time. This is the desired behaviour for me, as my compiled material is quite large and will quickly take up a lot of space.
But my target branch is accumulating commits each time the action runs, as you can see here and here. This is my configuration (identical for both repos):
if: success()
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: website
keep_history: false
env:
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}```
Could you please add an option to make this path.join
optional?
ghaction-github-pages/src/main.ts
Line 66 in 1ae239f
The reason is that I would like to deploy a folder built with Nix. When Nix builds something, the output lands in a central store under /nix/store
and the output which gets placed in the current directory is a symlink to the store location. Since the build_dir
option needs a relative path, I end up having to work around this problem by prepending it with ../../../../../
, which is kind of ugly. It works for now, but I would prefer to be able to provide an absolute path (or even better, just be able to provide the symlink, but that doesn't seem to work because the copy
function doesn't want to overwrite a folder with a symlink).
Thanks!
build_dir
ln -s ./filename.tar.gz ./filename
inside build_dir
)Tell me what should happen
It should publish the symlinks (though I think GH pages does not support it) or copy the destination file/dir over the symlink before publishing.
Tell me what happens instead
I have two of such files, they all fail:
Cannot stat symlink rsa.db.tar.zst for ./pkgs/rsa.db: Error: ENOENT: no such file or directory, lstat 'rsa.db.tar.zst'
Cannot stat symlink rsa.files.tar.zst for ./pkgs/rsa.files: Error: ENOENT: no such file or directory, lstat 'rsa.files.tar.zst'
I ran ls -Ahl <build_dir>
after generating such files, and it outputs the following:
Run ls -Ahl /__w/rsaur/rsaur/pkgs
total 3.5M
-rw-r--r-- 1 builduser builduser 1.4M Dec 30 08:58 chili-sddm-theme-0.1.5-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 86K Dec 30 08:58 gamemode-1.6-3-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 201K Dec 30 08:58 gamescope-3.7.1-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 761K Dec 30 09:00 gdm-nox-3.36.3-6-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 58K Dec 30 09:00 gnome-shell-extension-arch-update-git-38+3+gbe86f9e-1-any.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 15K Dec 30 09:01 gnome-shell-extension-clock-override-git-5+47+g7a40543-1-any.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 5.6K Dec 30 09:01 gnome-shell-extension-no-annoyance-git-r34.f6e7691-1-any.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 12K Dec 30 08:58 lib32-gamemode-1.6-3-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 415K Dec 30 09:02 lib32-mangohud-0.6.1-2-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 118K Dec 30 09:00 libgdm-nox-3.36.3-6-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 405K Dec 30 09:02 mangohud-0.6.1-2-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 7.9K Dec 30 09:03 mangohud-common-0.6.1-2-x86_64.pkg.tar.zst
-rw-r--r-- 1 builduser builduser 6.6K Dec 30 09:03 nvidia-xrun-git-0.3.83.g270b6c0-1-x86_64.pkg.tar.zst
lrwxrwxrwx 1 root root 14 Dec 30 09:03 rsa.db -> rsa.db.tar.zst
-rw-r--r-- 1 root root 3.5K Dec 30 09:03 rsa.db.tar.zst
lrwxrwxrwx 1 root root 17 Dec 30 09:03 rsa.files -> rsa.files.tar.zst
-rw-r--r-- 1 root root 7.5K Dec 30 09:03 rsa.files.tar.zst
Those are the exact commit and build that fail.
Download the log file of your build and attach it to this issue.
Beware that the log is very long.
https://github.com/SummerSec/SummerSec/actions/runs/3358344524/jobs/5565173197
https://github.com/SummerSec/SummerSec/actions/runs/3358344524/workflow
2.
3.
Tell me what should happen
Tell me what happens instead
# paste your YAML workflow file here and remove sensitive data
Download the log file of your build
and attach it to this issue.
It could be a good idea to add a target path field, who, when used,
Hey there Crazy Max. I'm trying to publish the contents of my build
folder using this action. Here's my configuration:
name: Publish
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
When I get to the publish action, I run into this error:
π Deploying build directory to gh-pages branch on LandonSchropp/landonschropp.com repo
git init
/home/runner/work/landonschropp.com/landonschropp.com/build/.git: Permission denied
##[error]The process 'git' failed with exit code 1
##[error]Node run failed with exit code 1
It looks like the error is happening here. However, I can't figure out why the build
directory would have any weird permissions. Did the action somehow get pointed the wrong place? Any ideas?
Thanks in advance!
I tried to make an auto jsdoc build and deployement workflow using this tool but when your tool was running it tried to connect to https://***/github.com instead of https://github.com.
You can check my worflow on my repo arthuro555/gdevelop-server to see if the error comes from me.
The git server's url is hardcoded to github.com
(see source) which is fine for github usage however it would be cool to have possibility to override this default value via e.g. env variable GIT_DOMAIN
.
This would makes the script even more universal and could be used for private's git servers.
I found that I could only write HTML in the YML file, and I could not use the file in my main branch directly
Parallel jobs causes randomly gh pages push failure:
Pushing public directory to main branch on ... repo
/usr/bin/git push https://***@github.com/***.git main
To https://github.com/***.git
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'https://github.com/***.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: The process '/usr/bin/git' failed with exit code 1
Succesful push
failures
error: failed to push some refs to ...
hint: Updates were rejected because the remote contains work that you do
hint: not have locally.
I think library should have some kind of retry mechanism for this case
Could you add the ability to use the same commit name as the action commit name?
I have this configuration:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Deploy GitHub Pages
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: public
fqdn: example.com
target_branch: gh-pages
env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/
GITHUB_PAT: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
and I'm getting the following error:
β
Use GITHUB_PAT
π Initializing local git repo
git init .
Initialized empty Git repository in /tmp/github-pages-p0j0xG/.git/
git checkout --orphan gh-pages
Switched to a new branch 'gh-pages'
π Copying /home/runner/work/repo/repo/public contents to /tmp/github-pages-p0j0xG
βοΈ Writing example.com domain name to public/CNAME
##[error]ENOENT: no such file or directory, open 'public/CNAME'
##[error]Node run failed with exit code 1
I'm pretty sure that path.join(build_dir, 'CNAME')
(https://github.com/crazy-max/ghaction-github-pages/blob/master/src/main.ts#L59) needs to be path.join(tmpdir, 'CNAME')
I have a directory website/
with my full jekyll site, but I generate the index.md
file before I want to publish:
- uses: actions/[email protected]
- uses: actions/checkout@v2
- run: npm install
- run: npm run build-website
- run: ls -la website/
- name: GitHub Pages
uses: crazy-max/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build_dir: website
It properly deploys the site to gh-pages
but it is missing the generated index.md
file from the npm run build-website
step.
I added a ls -la website/
right after and the file is there:
Do you have an idea what might be going on here?
Could not find build dir in with step, example of failed job can find here:
https://github.com/DynamicKit/VersionKit/runs/825367023?check_suite_focus=true
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: $BUILD_LOCATION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_LOCATION: public
If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called .nojekyll in the root of your publishing source, then follow your static site generator's instructions to build your site locally.
It would be really helpful to have this documented prominently on your readme!
And also to explain whether you need to go to https://github.com/you/repo/settings/pages to enable it or if it will Just Work once you run this Action.
Bin
When I am deploying a directory I am getting this error:
EEXIST: file already exists, mkdir '/tmp/github-pages-3fqEIE/lib/absinthe/priv'
I am using mix (elixir's build tool) to build a release. After running, mix will create a _build/prod
directory with all the files needed to run the app.
Deploys as usual
Error: EEXIST: file already exists, mkdir '/tmp/github-pages-3fqEIE/lib/absinthe/priv'
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Elixir
uses: actions/[email protected]
with:
otp-version: 22.x
elixir-version: 1.9.x
- name: Install Deps
run: mix deps.get
- name: Lint
run: |
mix format --check-formatted
mix credo --ignore readability --strict
- name: Test
run: mix test --cover
env:
MIX_ENV: test
- name: Build Relase
if: success()
run: mix release
env:
TC_PUBLIC_API_KEY: ${{ secrets.TC_PUBLIC_API_KEY }}
TC_PRIVATE_API_KEY: ${{ secrets.TC_PRIVATE_API_KEY }}
MIX_ENV: prod
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: production
build_dir: _build/prod
keep_history: true
allow_empty_commit: false
commit_message: "Production deploy"
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Personal access tokens provide full access to someone's account if they are leaked. It would be better to use a deploy key, which grants only push access to the specific repo.
Hi, first all, thanks for this action to make me be more focused on writing posts, not for spend so much time to maintaining the deploy scripts
Pushed code, actions build exit successfully but report: Error: Cannot overwrite directory '/tmp/xxx' with non-directory '/home/runner/work/xxx'
The gh-pages branch should contain builded site
GitHub actions report the error: Error: Cannot override directory '/tmp/xxx' with non-directory '/home/runner/work/xxx'
# paste your YAML workflow file here and remove sensitive data
- uses: crazy-max/ghaction-github-pages@v2
if: success()
with:
verbose: true
build_dir: site
target_branch: gh-pages
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
2021-09-29T03:09:11.9604280Z ##[group]Run crazy-max/ghaction-github-pages@v2
2021-09-29T03:09:11.9604921Z with:
2021-09-29T03:09:11.9605294Z verbose: true
2021-09-29T03:09:11.9605703Z build_dir: site
2021-09-29T03:09:11.9606157Z target_branch: gh-pages
2021-09-29T03:09:11.9606614Z keep_history: true
2021-09-29T03:09:11.9607057Z domain: github.com
2021-09-29T03:09:11.9607541Z allow_empty_commit: true
2021-09-29T03:09:11.9607966Z jekyll: true
2021-09-29T03:09:11.9608361Z dry_run: false
2021-09-29T03:09:11.9608718Z env:
2021-09-29T03:09:11.9610179Z GITHUB_TOKEN: ***
2021-09-29T03:09:11.9610623Z ##[endgroup]
2021-09-29T03:09:12.3716308Z ##[group]Cloning c4dr01d/c4dr01d.github.io
2021-09-29T03:09:12.3750901Z [command]/usr/bin/git clone --quiet --branch gh-pages --depth 1 ***github.com/c4dr01d/c4dr01d.github.io.git .
2021-09-29T03:09:12.8148526Z ##[endgroup]
2021-09-29T03:09:12.8157710Z ##[group]Copying /home/runner/work/c4dr01d.github.io/c4dr01d.github.io/site to /tmp/github-pages-3IjFT9
2021-09-29T03:09:12.8180535Z ##[error]Error: Cannot overwrite directory '/tmp/github-pages-3IjFT9' with non-directory '/home/runner/work/c4dr01d.github.io/c4dr01d.github.io/site'.
2021-09-29T03:09:12.8194358Z 0 file(s) copied.
2021-09-29T03:09:12.8195704Z ##[endgroup]
2021-09-29T03:09:12.8267307Z No changes to commit
Hi,
first, many thanks for this useful action. For some reason, I encounter the following issue that seems to be the same as #27, but with @v2.
The history of the gh-action branches is kept and commits are added incrementally.
keep_history: false
or leaving it as defaultAccording to how I understand the keep_history
option, a new root commit without history should be force-pushed to the gh-action branch.
The history of the gh-action branch is kept and a new commit is appended. The logs shows the "Initializing local git repo" so the correct code branch is taken, but for some reason the history is available anyway(??!)
Config:
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
build_dir: doc/_build/html
commit_message: Build documentation from ${{ github.ref }}@${{ github.sha }}
keep_history: false
jekyll: false
env:
GITHUB_TOKEN: ${{ github.token }}
See https://github.com/hibtc/cpymad/suites/2542747788/logs, relevant part:
2021-04-20T19:51:17.0734174Z ##[group]Run make -C doc html
2021-04-20T19:51:17.0734723Z οΏ½[36;1mmake -C doc htmlοΏ½[0m
2021-04-20T19:51:17.0776684Z shell: /usr/bin/bash -e {0}
2021-04-20T19:51:17.0777116Z env:
2021-04-20T19:51:17.0777715Z pythonLocation: /opt/hostedtoolcache/Python/3.9.4/x64
2021-04-20T19:51:17.0778537Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.4/x64/lib
2021-04-20T19:51:17.0779131Z ##[endgroup]
2021-04-20T19:51:17.0886030Z make: Entering directory '/home/runner/work/cpymad/cpymad/doc'
2021-04-20T19:51:17.0911440Z sphinx-build -b html -d _build/doctrees . _build/html
2021-04-20T19:51:17.4751042Z Running Sphinx v3.5.4
2021-04-20T19:51:17.7485254Z building [mo]: targets for 0 po files that are out of date
2021-04-20T19:51:17.7486747Z building [html]: targets for 14 source files that are out of date
2021-04-20T19:51:17.7497774Z updating environment: [new config] 14 added, 0 changed, 0 removed
2021-04-20T19:51:17.7498750Z reading sources... [ 7%] building
2021-04-20T19:51:17.7978636Z reading sources... [ 14%] cpymad/index
2021-04-20T19:51:17.8037122Z reading sources... [ 21%] cpymad/libmadx
2021-04-20T19:51:18.2414855Z reading sources... [ 28%] cpymad/madx
2021-04-20T19:51:18.5807918Z reading sources... [ 35%] cpymad/types
2021-04-20T19:51:18.6121798Z reading sources... [ 42%] cpymad/util
2021-04-20T19:51:18.7107052Z reading sources... [ 50%] getting-started
2021-04-20T19:51:18.7439975Z reading sources... [ 57%] index
2021-04-20T19:51:18.7700194Z reading sources... [ 64%] installation
2021-04-20T19:51:18.7788902Z reading sources... [ 71%] installation/macos
2021-04-20T19:51:18.8304322Z reading sources... [ 78%] installation/troubleshooting
2021-04-20T19:51:18.8658443Z reading sources... [ 85%] installation/unix
2021-04-20T19:51:18.8855518Z reading sources... [ 92%] installation/windows
2021-04-20T19:51:18.9174607Z reading sources... [100%] known-issues
2021-04-20T19:51:18.9242814Z
2021-04-20T19:51:18.9244476Z looking for now-outdated files... none found
2021-04-20T19:51:18.9269529Z pickling environment... done
2021-04-20T19:51:18.9270163Z checking consistency... done
2021-04-20T19:51:18.9376528Z preparing documents... done
2021-04-20T19:51:18.9377088Z writing output... [ 7%] building
2021-04-20T19:51:19.0554705Z writing output... [ 14%] cpymad/index
2021-04-20T19:51:19.0738591Z writing output... [ 21%] cpymad/libmadx
2021-04-20T19:51:19.1723831Z writing output... [ 28%] cpymad/madx
2021-04-20T19:51:19.2897633Z writing output... [ 35%] cpymad/types
2021-04-20T19:51:19.3121172Z writing output... [ 42%] cpymad/util
2021-04-20T19:51:19.3475729Z writing output... [ 50%] getting-started
2021-04-20T19:51:19.3964727Z writing output... [ 57%] index
2021-04-20T19:51:19.4610896Z writing output... [ 64%] installation
2021-04-20T19:51:19.4846832Z writing output... [ 71%] installation/macos
2021-04-20T19:51:19.5158515Z writing output... [ 78%] installation/troubleshooting
2021-04-20T19:51:19.5592462Z writing output... [ 85%] installation/unix
2021-04-20T19:51:19.5915761Z writing output... [ 92%] installation/windows
2021-04-20T19:51:19.6871761Z writing output... [100%] known-issues
2021-04-20T19:51:19.7029834Z
2021-04-20T19:51:19.7425452Z generating indices... genindex py-modindex done
2021-04-20T19:51:19.7426871Z highlighting module code... [ 20%] cpymad.libmadx
2021-04-20T19:51:19.7428169Z highlighting module code... [ 40%] cpymad.madx
2021-04-20T19:51:19.8311756Z highlighting module code... [ 60%] cpymad.types
2021-04-20T19:51:19.8433016Z highlighting module code... [ 80%] cpymad.util
2021-04-20T19:51:19.8861006Z highlighting module code... [100%] posix
2021-04-20T19:51:19.8861418Z
2021-04-20T19:51:19.9031079Z writing additional pages... search done
2021-04-20T19:51:19.9262054Z copying static files... done
2021-04-20T19:51:19.9263462Z copying extra files... done
2021-04-20T19:51:19.9326648Z dumping search index in English (code: en)... done
2021-04-20T19:51:19.9342139Z dumping object inventory... done
2021-04-20T19:51:19.9342802Z build succeeded.
2021-04-20T19:51:19.9343153Z
2021-04-20T19:51:19.9343917Z The HTML pages are in _build/html.
2021-04-20T19:51:20.0790804Z
2021-04-20T19:51:20.0802017Z Build finished. The HTML pages are in _build/html.
2021-04-20T19:51:20.0804681Z make: Leaving directory '/home/runner/work/cpymad/cpymad/doc'
2021-04-20T19:51:20.0998926Z ##[group]Run crazy-max/ghaction-github-pages@v2
2021-04-20T19:51:20.0999503Z with:
2021-04-20T19:51:20.0999878Z build_dir: doc/_build/html
2021-04-20T19:51:20.1000691Z commit_message: Build documentation from refs/heads/master@e0c1e858818737eda5bb2e4654800afda3007001
2021-04-20T19:51:20.1001465Z jekyll: false
2021-04-20T19:51:20.1001867Z domain: github.com
2021-04-20T19:51:20.1002304Z target_branch: gh-pages
2021-04-20T19:51:20.1002852Z keep_history: false
2021-04-20T19:51:20.1003274Z allow_empty_commit: true
2021-04-20T19:51:20.1003661Z env:
2021-04-20T19:51:20.1004191Z pythonLocation: /opt/hostedtoolcache/Python/3.9.4/x64
2021-04-20T19:51:20.1004939Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.4/x64/lib
2021-04-20T19:51:20.1006539Z GITHUB_TOKEN: ***
2021-04-20T19:51:20.1006933Z ##[endgroup]
2021-04-20T19:51:20.3564284Z β¨ Initializing local git repo
2021-04-20T19:51:20.3704317Z π Copying /home/runner/work/cpymad/cpymad/doc/_build/html contents to /tmp/github-pages-SGmq7P
2021-04-20T19:51:20.4140595Z π« Disabling Jekyll support via /tmp/github-pages-SGmq7P/.nojekyll
2021-04-20T19:51:20.4839302Z π¨ Configuring git committer as GitHub <[email protected]>
2021-04-20T19:51:20.5644320Z π Updating index of working tree
2021-04-20T19:51:20.6967440Z ##[group]π¦ Committing changes as github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> author
2021-04-20T19:51:20.8057824Z commit 22ec919a7157a45e98da4cd55c0e147423bd48a0
2021-04-20T19:51:20.8060071Z Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-20T19:51:20.8061150Z Date: Tue Apr 20 19:51:20 2021 +0000
2021-04-20T19:51:20.8061776Z
2021-04-20T19:51:20.8063063Z Build documentation from refs/heads/master@e0c1e858818737eda5bb2e4654800afda3007001
2021-04-20T19:51:20.8063973Z
2021-04-20T19:51:20.8065179Z .buildinfo | 2 +-
2021-04-20T19:51:20.8066202Z _static/basic.css | 23 ++++++++++++++---------
2021-04-20T19:51:20.8067515Z _static/fonts/Inconsolata-Bold.ttf | Bin 0 -> 109948 bytes
2021-04-20T19:51:20.8068952Z _static/fonts/Inconsolata-Regular.ttf | Bin 0 -> 96964 bytes
2021-04-20T19:51:20.8070272Z _static/fonts/Inconsolata.ttf | Bin 0 -> 63184 bytes
2021-04-20T19:51:20.8071529Z _static/fonts/Lato-Bold.ttf | Bin 0 -> 656544 bytes
2021-04-20T19:51:20.8072712Z _static/fonts/Lato-Regular.ttf | Bin 0 -> 656568 bytes
2021-04-20T19:51:20.8074020Z _static/fonts/RobotoSlab-Bold.ttf | Bin 0 -> 170616 bytes
2021-04-20T19:51:20.8075384Z _static/fonts/RobotoSlab-Regular.ttf | Bin 0 -> 169064 bytes
2021-04-20T19:51:20.8076538Z index.html | 2 +-
2021-04-20T19:51:20.8077463Z searchindex.js | 2 +-
2021-04-20T19:51:20.8078545Z 11 files changed, 17 insertions(+), 12 deletions(-)
2021-04-20T19:51:20.8080034Z ##[endgroup]
2021-04-20T19:51:20.8081348Z π Pushing doc/_build/html directory to gh-pages branch on hibtc/cpymad repo
2021-04-20T19:51:23.1200384Z π Content of doc/_build/html has been deployed to GitHub Pages
2021-04-20T19:51:23.1300757Z Post job cleanup.
2021-04-20T19:51:23.2506013Z [command]/usr/bin/git version
2021-04-20T19:51:23.2556104Z git version 2.31.1
2021-04-20T19:51:23.2591490Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-04-20T19:51:23.2629523Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-04-20T19:51:23.2895187Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-04-20T19:51:23.2924848Z http.https://github.com/.extraheader
2021-04-20T19:51:23.2934087Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-04-20T19:51:23.2972241Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-04-20T19:51:23.3324688Z Post job cleanup.
2021-04-20T19:51:23.4349769Z [command]/usr/bin/git version
2021-04-20T19:51:23.4403281Z git version 2.31.1
2021-04-20T19:51:23.4446419Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-04-20T19:51:23.4488021Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-04-20T19:51:23.4737883Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-04-20T19:51:23.4766796Z http.https://github.com/.extraheader
2021-04-20T19:51:23.4777489Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-04-20T19:51:23.4813987Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-04-20T19:51:23.5109115Z Cleaning up orphan processes
Hiya,
I am running into the following error and I haven't been able to determine why:
error: src refspec gh-pages does not match any.
error: failed to push some refs to 'https://MitchTalmadge:As provided by GitHub [email protected]/MitchTalmadge/CleanTweets.git'
##[error]Docker run failed with exit code 1
The odd part to me is the "As provided by GitHub Actions" found in the URL... I know for certain that the PAT secret I am using does contain a personal access token, not anything like that.
The full build logs are found here.
Here is my workflow:
name: Web Frontend
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/[email protected]
- name: Install
run: npm --prefix web install
- name: Build
if: success()
run: npm --prefix web run build
- name: Deploy
if: success()
uses: crazy-max/[email protected]
env:
GITHUB_PAT: ${{ secrets.GH_PAT }}
with:
build_dir: web/dist
The branch does exist in my repo:
Thanks for any suggestions.
Thanks for this handy action!
I wonder whether it's possible to run the action with a custom domain.
At the moment, after each deployment, I need to go to the settings to add the custom domain, which will result in a new commit on the gh-pages
branch that will add the CNAME
file.
I see in the documentation the domain
input, but I am not sure if this is indeed the one I am looking for.
Name | Type | Description |
---|---|---|
domain |
String | Git domain (default github.com ) |
Not using --force should be the default IMO.
I built a static site generator in python and use the git commit history of markdown files to display a "Last modified" date on the built website. When used locally, my build process works and display the date correctly.
But when I used this github action, the git history seems to disappear entirely and the date displayed is the built date,
The date on the built page should be may 24.
The date on the built page is May 29,
name: website
on: push
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Generate Chisai
run: python3 src/build.py --prod
#-
#name: Create cname file
# run: echo 'mydomain.com' > build/CNAME
-
name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: build
keep_history: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Thanks for your help.
Is your feature request related to a problem? Please describe
If I disable the option allow_empty_commit
, then every time when I update my workflow file (or any other file not related to website), deploy is triggered and I get an error because there is no changes in website.
Describe the solution you'd like
It would be great to exit the action successfully with an empty commit, because if I activate the continue-on-error option, the action will complete successfully with any other error, which is not safe.
Describe alternatives you've considered
This behavior could be optional with the additional parameter or allow_empty_commit
could be an enumeration with the third option like skip
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.