Is it possible to add custom.css file during the action?
MAJA-Lin opened this issue · comments
Scott Lin commented
Hi,
I tried to add one more step in the github action like this:
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
CSS_URL: https://raw.githubusercontent.com/test/custom.css
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Logseq Publish
uses: pengx17/logseq-publish@main
- name: add a nojekyll file
run: touch $GITHUB_WORKSPACE/www/.nojekyll
- name: Copy custom css file
run: curl ${{ env.CSS_URL }} > $GITHUB_WORKSPACE/www/static/css/custom.css
But got a permission denied error:
Run curl https://raw.githubusercontent.com/test//custom.css > $GITHUB_WORKSPACE/www/static/css/custom.css
/home/runner/work/_temp/ced[6](https://github.com/test/runs/5447190062?check_suite_focus=true#step:6:6)f8a4-26[7](https://github.com/test/runs/5447190062?check_suite_focus=true#step:6:7)8-4f9a-a5be-12c7672b73c6.sh: line 1: /home/runner/work/test/www/static/css/custom.css: Permission denied
Error: Process completed with exit code 1.
As I followed the instruction to change my .yml file, another error occurred:
Run pengx17/logseq-publish@main
Run mkdir -p /home/runner/work/test/www
mkdir: cannot create directory '/home/runner': Permission denied
Error: Process completed with exit code 1.
Run actions/upload-artifact@v2
/usr/bin/docker exec 4f61f56aa52ff49[8](https://github.com/test/runs/5447331305?check_suite_focus=true#step:5:8)5bf92f1cbc1ba461d54b7e62d17da8cbdd2ae[24](https://github.com/test/runs/5447331305?check_suite_focus=true#step:5:24)949eeed2f sh -c "cat /etc/*release | grep ^ID"
Warning: No files were found with the provided path: www/trace.zip. No artifacts will be uploaded.
Is it possible to overwrite static/css/custom.css
file or include it in the step?
Thank you.
Peng Xiao commented
Should have been fixed by https://github.com/pengx17/logseq-publish/releases/tag/0.1.6.
The issue is that the user in Docker will be using root
. I added a new step in the action.yml to make sure all files are owned by the current user (runner
).
Can you try again?
Scott Lin commented
It works perfectly for me.
Thanks a lot!