I have a website fetching the facebook events of one of my webpage thanks to a ruby script.
The script is executed within a github action before the build.
Unfortunately, the facebook token has a limited validity. I managed to find a way to renew it but I'm wondering if it is possible to update my FACEBOOK_TOKEN repository secret from a Github action ?
Of course I'm open to alternative like finding a way to have a permanent token!
Related
I own two GitHub accounts and would like to push one file from accountA/repoA to accountB/repoB in an automatic and periodic fashion through GitHub action.
I have come across some tutorials but they seem to be geared towards repositories in the same organization.
A simple simple script example or tutorial would be very useful.
The general idea would be an action like andstor/copycat-action.
That would require a Personal Access Token with access to org2/repo2
You schedule it on org1/repo1
You configure it to push a file to org2/repo2
So I have a Gitlab CI that will, currently, queue up every Monday at 6am and run. All it does is push a build command to Netlify using a build hook.
My current set up is Gitlab for VC, Netlify for deployment, HUGO as my static site generator.
No problem.
Here's what I'm trying to do: I have access to an API that shows me all of the items on a particular website (podcast) as JSON.
I want to write a Gitlab CI that will fetch the API, grab the newest thing, and then create a new page with hugo new content/{title}.md, and fill that file's front matter with something from the JSON object.
I'm not even sure this is possible, or that this is the best route to go.
But basically, every time I upload a new podcast, I want Gitlab and Netlify to rebuild my website with a dedicated page for that episode.
The easiest route is to parse the JSON with javascript and NOT create a seperate page, but I guess you figured that out already.
The way you describe is also possible. Any server-side script can fetch the API and run the hugo new command (as long as it is on the same/deployment server). I would do it in PHP on my server, but I am kind of old-fashioned. Gitlab CI can probably do this too, but I have never tried it.
You did not really ask a question, but did I answer it anyway?
I've managed to get openshift to download my github commits and fire on a webhook without issue. What I'd love to be able to do though is make use of the Github Status API to be able to mark builds as good or bad.
Has anyone had any success in doing this? If so how do you do it? I was thinking of doing it via the postBuild hook in openshift however I don't think I have access to the SHA nor would I be albe to post on failure.
The OPENSHIFT_BUILD_COMMIT environment variable, along with a few others, will be set in the image and provide details about the remote repo used.
https://docs.openshift.org/3.9/dev_guide/builds/build_output.html#output-image-environment-variables
You should be able to see those from the hook you run in the image as part of the postCommit hook.
so, I have this github organization with its blog powered by Jekyll.
https://github.com/AvoGenie/avogenie.github.io
I would like github to run jekyll build on every commit, however currently it isn't doing it.
How can I fix this?
Any help is appreciated.
Kind Regards,
Adrian
PS: I checked google and stackoverflow but I couldn't find anything that helps me, because all guides and tutorials and docs just say, 'push to github'.
Your site seems fine to me, looking at the commits you currently have on the Github repository (latest commit on master right now = 14ca1e5).
What is different from what you expect?
So, turns out when I updated the repo I accidentally deleted the CNAME file that githubs needs in order to work with custom domains.
Two learnings from this:
Check whether you have a CNAME file when getting a 404 error on a custom domain with github pages
Also test the default username.github.io when deploying to github pages
I'm working on making a site that allows login with Github and I'm using Django for this. I've gotten as far as redirecting the user to the github authorization page, and then redirecting the user to another part of my project after successful authorization. My question is then: How do i extract such things as the users username and other values? I imagine that a JSON object is sent to me, but how do I use it and where do I get it? I have never done anything like this before, so it might be obvious but if anyone could help me it would be appreciated. Bear in mind that I'm a newbie in Django.
Github login is just OAuth. There is full documentation on Github's dev site on how to do it manually, but you probably want to use one of the many Python libraries which make the process easier such as python-social-auth or django-allauth.
Check out:
https://developer.github.com/guides/basics-of-authentication/
But there is package with this functionality:
python-social-auth