Getting Started - StrawbethyMilkshake/OpenLinkway GitHub Wiki
Getting Started
Deployment
Deployment with GitHub and Cloudflare Pages (Recommended)
The easiest way to deploy OpenLinkway and keep it up to date is via GitHub and Cloudflare. We have an update mechanism via GitHub Actions, which you can use to keep your site up to date with the latest releases from OpenLinkway. To do this you should follow these steps.
GitHub
- In your GitHub account create a new empty repository, do not initialise with a readme. This can be a private repository, however, please note any files included in this repository will be available on your deployed website so do not store any sensitive information in here!
I recommend calling your repository either your subdomain or
{subdomain}.{domain}.{tld}
for easy reference. For example,OpenLinkwayDemo
oropenlinkwaydemo.strawbethy.com
. - Once you have created your repository, at the bottom of the newly created repository, in the
...or import code from another repository
section select theImport code
button - Using the import tool, set
Your old repository's clone URL
tohttps://github.com/StrawbethyMilkshake/OpenLinkway.git
and clickBegin import
. - Once you have imported the repository, you should see the list of imported files, you may delete the
README.md
file, you must retain theLICENSE.md
file. How you go about this will be discussed in the Configuration section of the document. - In the
Settings
tab of your GitHub repo, navigate toActions > General
in the sidebar and ensureAllow all actions and reusable workflows
is selected and clicksave
. - In GitHub open the
.github/workflows
folder and openmain.yml
, replace the entire contents ofmain.yml
with the below, you should change theon > schedule > - cron
value to a time that suits you, you can use a service like Crontab Guru to help configure your schedule. Once done, commit the changes to themain
branch.
name: Update OpenLinkway
on:
schedule:
- cron: '25 17 * * *'
push:
branches:
- main
jobs:
create_release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
- name: Get Upstream
run: |
curl -s https://api.github.com/repos/StrawbethyMilkshake/OpenLinkway/releases/latest\
|grep "OpenLinkway.tar.gz"\
| cut -d : -f 2,3\
| cut -d , -f 2\
| tr -d \"\
| wget -qi -
tar -xzf OpenLinkway.tar.gz
- name: Delete Tar
run: rm OpenLinkway.tar.gz
- name: Check for updates
id: updateCheck
run: |
if [ -n $(git status --porcelain) ](/StrawbethyMilkshake/OpenLinkway/wiki/--n-$(git-status---porcelain)-); then
echo "There are modified or untracked files."
git add .
git commit -m "OpenLinkway Updates"
echo "updates=true" >> $GITHUB_OUTPUT
else
echo "There are no modified or untracked files."
echo "updates=false" >> $GITHUB_OUTPUT
fi
- name: Push changes
if: ${{ steps.updateCheck.outputs.updates == 'true' }}
uses: ad-m/github-push-action@master
with:
force: true
branch: preview-OpenLinkway-Updates
- Once done, the workflow should execute which will check for updates from OpenLinkway. How to update will be discussed in the Updating section of the document but at a high level it creates a branch called
preview-OpenLinkway-Updates
. - In the
Settings
tab of your GitHub repo, navigate toEmail Notifications
section, enter your email address in theAddress
field and clickSetup Notifications
.
Cloudflare
WIP
rm -r .github
This section will largely just explain how to set up Cloudflare pages, you should configure the build command as Configuration
The OpenLinkway app provides configuration options through the following files:
- config/links.json: This file allows you to define the links displayed in the app. You can customise properties such as URL, text, hover text, colors, and more.
- config/page.json: This file allows you to configure the overall appearance and metadata of the app. You can set properties like logo, background image, favicon, title, description, and language.
- config/bars.json: This file allows you to configure the header and footer bars of the app. You can define their colours and items.