-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (76 loc) · 2.64 KB
/
laravel-one-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: laravel-one-release
on:
release:
types: [ created ]
defaults:
run:
working-directory: ./builds
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: laravel-one-publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get current release tag
id: branch-name
run: echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: add assets to release
run: |
sha512sum laravel-one > laravel-one.sha512sum
gh release upload ${{ steps.branch-name.outputs.SOURCE_TAG }} laravel-one.sha512sum
gh release upload ${{ steps.branch-name.outputs.SOURCE_TAG }} laravel-one
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to wiki
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "docs"
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.ABENEVAUT_GITHUB_TOKEN }}
ghpages:
runs-on: ubuntu-latest
concurrency:
group: laravel-one-ghpages-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Initialize PHP ${{ env.php_version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-node-php_${{ env.php_version }}-
- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install -o --no-interaction --prefer-dist
- name: Web pages cache
id: web-pages-cache
uses: actions/cache@v2
with:
path: .cache
key: ${{ runner.os }}-pages-cache-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-pages-cache-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
- name: Generate static pages
run: php laravel-one generate https://laravel-one.abenevaut.dev
- uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.ABENEVAUT_GITHUB_TOKEN }}
branch: gh-pages
folder: dist