From ede183ac31fa61089fbb2c0a527597d90db68f4f Mon Sep 17 00:00:00 2001 From: mrlp4 <38989909+mrlp4@users.noreply.github.com> Date: Wed, 26 Jun 2024 13:04:54 +0200 Subject: [PATCH] Add ci build with netlify publish (#75) * add ci script * add netlify deployment * debug branch name for testing * change build dir * netlify action ver upd * skip build & install in netlify action * switch ci build to trigger on master push --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..19e87c0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +on: + push: + branches: + - master + +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + name: Publish Logseq graph + steps: + - uses: actions/checkout@v3 + - uses: logseq/publish-spa@v0.3.0 + with: + theme-mode: dark + accent-color: green + output-directory: build + - name: Add a nojekyll file # to make sure asset paths are correctly identified + run: touch $GITHUB_WORKSPACE/build/.nojekyll + - name: Deploy to Netlify + uses: jsmrcaga/action-netlify-deploy@v2.2.0 + with: + build_directory: build + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_DEPLOY_MESSAGE: "Deployed on new master commit" + NETLIFY_DEPLOY_TO_PROD: true + install_command: "echo Skipping installing deps" + build_command: "echo Skipping building"