Skip to content

Commit ad54d10

Browse files
authored
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).
1 parent 4579768 commit ad54d10

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
@@ -311,13 +311,40 @@ In its default configuration, al-folio will copy the top-level `README.md` to th
311311

312312
#### Upgrading from a previous version
313313

314-
If you installed **al-folio** as described above, you can upgrade to the latest version as follows:
314+
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:
315+
316+
```yaml
317+
name: Sync from template
318+
on:
319+
# cronjob trigger
320+
schedule:
321+
- cron: "0 0 1 * *"
322+
# manual trigger
323+
workflow_dispatch:
324+
jobs:
325+
repo-sync:
326+
runs-on: ubuntu-latest
327+
steps:
328+
# To use this repository's private action, you must check out the repository
329+
- name: Checkout
330+
uses: actions/checkout@v3
331+
- name: actions-template-sync
332+
uses: AndreasAugustin/actions-template-sync@v0.7.3
333+
with:
334+
github_token: ${{ secrets.GITHUB_TOKEN }}
335+
source_repo_path: alshedivat/al-folio
336+
upstream_branch: master
337+
```
338+
339+
You will receive a pull request within your repository if there are some changes available in the template.
340+
341+
Another option is to manually update your code by following the steps below:
315342
316343
```bash
317344
# Assuming the current directory is <your-repo-name>
318345
$ git remote add upstream https://github.com/alshedivat/al-folio.git
319346
$ git fetch upstream
320-
$ git rebase v0.3.5
347+
$ git rebase v0.8.0
321348
```
322349

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

0 commit comments

Comments
 (0)