Skip to content

Commit aa8afac

Browse files
committed
Add github workflow
1 parent 01625c5 commit aa8afac

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Push to main
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.1'
17+
- name: "Build and push"
18+
run: |
19+
which php
20+
git config --global user.name 'Version Bot'
21+
git config --global user.email 'version-bot@users.noreply.github.com'
22+
git fetch
23+
git switch -c gh-pages
24+
git merge --allow-unrelated-histories -X theirs origin/main
25+
php generate-diffs.php
26+
chmod +x ./cleanup-for-website.sh
27+
./cleanup-for-website.sh
28+
git add .
29+
git commit -m "[Version-Bot] Add Laravel Version"
30+
git push -f origin gh-pages

cleanup-for-website.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rm -rf laravel
2+
rm -rf .github
3+
rm -f .gitignore
4+
rm -f generate-diffs.php
5+
rm -f cleanup-for-website.sh

0 commit comments

Comments
 (0)