Skip to content

Commit 085c2ab

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). Signed-off-by: George Araújo <[email protected]>
1 parent 0b223fa commit 085c2ab

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

+30-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Feel free to add your own page(s) by sending a PR.
8989
<a href="https://noman-bashir.github.io/" target="_blank">★</a>
9090
<a href="https://djherron.github.io/" target="_blank">★</a>
9191
<a href="https://rodosingh.github.io/" target="_blank">★</a>
92-
<a href="https://vdivakar.github.io/" target="_blank">★</a>
92+
<a href="https://vdivakar.github.io/" target="_blank">★</a>
9393
<a href="https://george-gca.github.io/" target="_blank">★</a>
9494
<a href="https://bashirkazimi.github.io/" target="_blank">★</a>
9595
</td>
@@ -317,13 +317,40 @@ In its default configuration, al-folio will copy the top-level `README.md` to th
317317

318318
#### Upgrading from a previous version
319319

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

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

0 commit comments

Comments
 (0)