Skip to content

Commit 232ca5f

Browse files
george-gcasiantonelli
authored andcommitted
Added information about using github action (alshedivat#1226)
By using this Github action it is possible to keep the derived repository up-to-date with its template. I am currently using this to keep my website up to date with the template repository. An example of the PR this action creates can be seen [here](george-gca/george-gca.github.io#13). Signed-off-by: George Araújo <[email protected]>
1 parent e32dd8c commit 232ca5f

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,40 @@ In its default configuration, al-folio will copy the top-level `README.md` to th
622622

623623
#### Upgrading from a previous version
624624

625-
If you installed **al-folio** as described above, you can upgrade to the latest version as follows:
625+
If you installed **al-folio** as described above, you can configure a [github action](https://github.com/AndreasAugustin/actions-template-sync) to automatically sync your repository with the latest version of the theme:
626+
627+
```yaml
628+
name: Sync from template
629+
on:
630+
# cronjob trigger
631+
schedule:
632+
- cron: "0 0 1 * *"
633+
# manual trigger
634+
workflow_dispatch:
635+
jobs:
636+
repo-sync:
637+
runs-on: ubuntu-latest
638+
steps:
639+
# To use this repository's private action, you must check out the repository
640+
- name: Checkout
641+
uses: actions/checkout@v3
642+
- name: actions-template-sync
643+
uses: AndreasAugustin/[email protected]
644+
with:
645+
github_token: ${{ secrets.GITHUB_TOKEN }}
646+
source_repo_path: alshedivat/al-folio
647+
upstream_branch: master
648+
```
649+
650+
You will receive a pull request within your repository if there are some changes available in the template.
651+
652+
Another option is to manually update your code by following the steps below:
626653
627654
```bash
628655
# Assuming the current directory is <your-repo-name>
629656
$ git remote add upstream https://github.com/alshedivat/al-folio.git
630657
$ git fetch upstream
631-
$ git rebase v0.3.5
658+
$ git rebase v0.8.0
632659
```
633660

634661
If you have extensively customized a previous version, it might be trickier to upgrade.

0 commit comments

Comments
 (0)