mirror of https://github.com/sussy-code/docs.git
71 lines
2.4 KiB
Markdown
71 lines
2.4 KiB
Markdown
---
|
|
title: 'Update guide'
|
|
---
|
|
|
|
# Keeping your instance synced
|
|
|
|
Movie-web's github is constantly being updated. If you want to keep your instance synced to the most recent version, you will need to follow one of the two guides below.
|
|
|
|
## Manual update
|
|
|
|
You can manually update by typing the below lines into a terminal at the root of your instance
|
|
|
|
```bash
|
|
git remote add movie-web https://github.com/movie-web/movie-web.git
|
|
git fetch movie-web
|
|
# Change `dev` to `master` if you want a stable experience
|
|
git merge movie-web/dev --allow-unrelated-histories
|
|
git push -f # Force push to your origin main branch
|
|
```
|
|
|
|
## Automatic update
|
|
|
|
You can also setup a scheduled workflow to automatically update your instance. This will allow you to keep your instance up to date without manual intervention.
|
|
|
|
To do this, you will need to follow the guide below...
|
|
|
|
1. Create a personal access token and add to repository's secret as `PAT`
|
|
2. Paste the below file into your repository's root `/.github/workflows` directory
|
|
|
|
```yaml
|
|
# File: .github/workflows/sync.yml
|
|
name: Sync fork
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "*/5 * * * *"
|
|
push:
|
|
branches:
|
|
- "*"
|
|
paths:
|
|
- .github/workflows/sync.yml
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: gh repo sync reponame/forkname
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
- uses: gautamkrishnar/keepalive-workflow@v1
|
|
```
|
|
::alert{type="info"}
|
|
This workflow yaml file was taken from this [Github repository](https://github.com/repo-sync/github-sync).
|
|
::
|
|
|
|
3. Replace the source_repo, source_branch and destination_branch with the correct values for your repository.
|
|
4. Commit and push the changes to your repository.
|
|
|
|
Your instance should now be automatically updated to the latest version.
|
|
|
|
# Upgrade version
|
|
|
|
## From `3.X` to `4.X`
|
|
|
|
You will need the latest version of the proxy worker. Redeploy a new worker using [our self-hosting guide](../2.proxy/1.deploy.md).
|
|
|
|
After you have the new worker, you will need to [get the new movie-web deployment files](https://github.com/movie-web/movie-web/releases/latest). **You CANNOT use the non-PWA version**. To upgrade safely without any complications, you need to update with `movie-web.pwa.zip`, Not the non-PWA version.
|
|
|
|
In the future, you will **ALWAYS** need to go with the PWA option. You cannot downgrade to non-PWA version without facing many caching complications.
|