diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..1c2ace9 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,20 @@ +on: + schedule: + - cron: "0 1 * * *" + workflow_dispatch: + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - name: Clone Astro Repo + run: | + git clone --depth 1 https://github.com/withastro/astro + cp -r astro/examples ./templates + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + commit_message: "[ci] update-templates" + branch: ${{ github.head_ref }} diff --git a/README.md b/README.md new file mode 100644 index 0000000..0477837 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Templates + +## What's this? + +This repo is a mirror of the [examples folder](https://github.com/withastro/astro/tree/main/examples) of the [Astro](https://astro.build) project. By having the examples in a separate repo, downloading the examples is much faster due to not having to download the entire Astro project. + +**Do not open issues or PRs here.** If you have an issue with an example, please open an issue in the [Astro repo](https://github.com/withastro/astro). diff --git a/templates/.gitkeep b/templates/.gitkeep new file mode 100644 index 0000000..e69de29