Open ransurf opened 1 year ago
the solution I'm using is to have 2 branches:
main
is where the obsidian plugin pushes commitsdeployed
is what vercel has set as the production
branch, and the "ignored build step" is set to "only build production"when you're ready to deploy, you run git push origin main:deployed
to push changes from the main
branch to the deployed
branch
mine has been working consistently, the only errors i get are due to the plugin not being able to parse the content of my files, not related to deployment. i personally prefer mine since i don't have to worry about running a command, and i just have a button at the bottom of my daily note to remind me to push the changes every day :) if it doesn't work it should be reversible anyways
push the changes
I would've thought you've had GitHub Actions automatize that?
i mean that's what im doing with my script
On Tue, Oct 10, 2023 at 10:58 AM zanodor @.***> wrote:
push the changes
I would've thought you've had GitHub Actions automatize that?
— Reply to this email directly, view it on GitHub https://github.com/oleeskild/obsidian-digital-garden/issues/320#issuecomment-1755955477, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATIO6ZKV4U7F2SL7O45JSR3X6WEEPAVCNFSM6AAAAAAYQ6TXXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVHE2TKNBXG4 . You are receiving this because you authored the thread.Message ID: @.***>
Now, if I leave Build production automatic or change it as per how the other method goes, I have some interference with another production (which is supposed to be below-production level) with a strange id ("mfhqlufhq") that Vercel made up by default, no doubt, which overrides my new automation settings.
Leaving it at automatic, I have the issue in General:
This is the production with the strange ID that comes up as the default in my Deployment tab as well.
I feel like I cannot go on unless I delete that. How can one proceed here? Is it something new at Vercel to have that as main deployment?
EDIT. This has nothing to do with anything. If one sets Only Build Production in Ignored Build Step, these messages come, but no need to worry.
Another question: how can the GH Action script see the Vercel-saved personal token? I checked, it is correct (I mean I thought it was my PAT, then I deleted the content) and still cannot run the script for failed token:
Input required and not supplied: token
i honestly am not sure on how to help, and i'm not sure what token you need. I think I just set up env variables in GH actions
On Tue, Oct 10, 2023 at 3:02 PM zanodor @.***> wrote:
Another question: how can the GH Action script see the Vercel-saved personal token? I checked, it is correct and still cannot run the script for failed token: Input required and not supplied: token
— Reply to this email directly, view it on GitHub https://github.com/oleeskild/obsidian-digital-garden/issues/320#issuecomment-1756330765, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATIO6ZJPWAOVUOYB7GISZRDX6XAXNAVCNFSM6AAAAAAYQ6TXXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGMZTANZWGU . You are receiving this because you authored the thread.Message ID: @.***>
I managed to make it wotk with PAT, which I had to register at GH Actions and in Vercel as well.
I followed advice and instructions from here.
My Actions script:
name: 'Daily auto-merge wth PAT'
on:
schedule:
# * is a special character in YAML so you have to quote this string
# daily
# - cron: '0 0 * * *'
# hourly at xx:50 time intervals, replace 50 with your desired minute
- cron: '50 * * * *'
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: <username>/<reponame>
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0
- name: Setup Git
run: |
git config --global user.name '<username>'
git config --global user.email '<your-email-here>'
- name: Merge and push
run: |
git fetch origin master:master
git checkout master
git merge main --no-ff -m "Merge main to master"
git push https://${{ secrets.PAT_TOKEN }}@github.com/<username>/<reponame>.git master
Anybody seeing this, you only need to change <username>
and <reponame>
with your own credentials.
Thanks for your idea and help!
The best way I've found to solve this for my use case with Cloudflare pages is to use Using concurrency - GitHub Docs. This way, you can use the multiple note publish feature without a run for every file.
For example, building in Github and pushing to Pages with workflows/publish.yml setting
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
I moved it to the other repository oops