-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (113 loc) · 4.69 KB
/
deploy.yaml
File metadata and controls
128 lines (113 loc) · 4.69 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Deploy to Github Pages
on:
push:
branches: ["main"]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Deploy GitHub pages
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
tools: composer
- name: Cache PHP dependencies
id: cache-primes
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm
- name: Install PHP dependencies
run: composer install
- name: Install NPM dependencies
run: npm install
- name: Setup deployment environment
run: |
cp .env.cicd .env
rm -Rf ./storage/logs
cat .env
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
rm -Rf dist database/database.sqlite
touch database/database.sqlite
php artisan migrate --graceful --ansi
npm run build
php artisan serve&
server_pid=$!
sleep 3
php artisan export
kill -INT $server_pid
app_url=$(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')
echo "Replace all remaining absolute URLs 'https://localhost' by \'$app_url\'"
LC_ALL=C find dist -type f -exec sed -i.bu "s|https://localhost/|$app_url|g" {} +
# Simulate redirections '-_-
cd dist
cp hot-wallet/index.html wallet.html
cp privacy/index.html privacy.html
cp terms/index.html terms.html
cp privacy-policy-archethic/index.html privacy-policy-archethic.html
cp privacy-policy-wallet/index.html privacy-policy-wallet.html
cp terms-of-use-defi/index.html terms-of-use-defi.html
cp job-offer/blockchain-developer/index.html recruitment-bcdev.html
cp assets/img/icon_32.png icon_32.png
cp assets/img/Ae-flat-white.png Ae-flat-white.png
cp assets/img/favicon.ico favicon.ico
cp assets/img/exchanges/polygon.png polygon.529bc018.png
cp assets/img/exchanges/bsc.png bsc.f03c1a39.png
cp assets/img/team/team-coo.webp team-coo.f8f566e9.webp
cp assets/img/mockups/hot-wallet-mockup.png wallet_hot.e5c72284.png
cp assets/img/partners/flowdesk.png flowdesk.f79ea27d.png
cp assets/img/partners/hacken.png hacken.50fb7c4d.png
cp assets/img/partners/probit.png probit.0f4008c9.png
cp assets/img/team/team-lead-tech.webp team-lead-tech.7dd37779.webp
cp assets/img/partners/generate.png generate.7a996275.png
cp assets/img/partners/beys.png beys.733d5304.png
cp assets/img/exchanges/ethereum.png ethereum.6a672b30.png
cp assets/img/partners/hec.png hec.fcfe3338.png
cp assets/img/partners/polytechnique.png polytechnique.4e03fd72.png
cp assets/img/partners/station-f.png station-f.021f9cab.png
cp assets/img/exchanges/archethic.png archethic.c598d950.png
cp assets/img/partners/cointribune.png cointribune.88725de8.png
cp assets/img/partners/cnrs.svg cnrs.9fa7c708.png
cp assets/img/team/team-ceo.webp team-ceo.68f5772f.webp
cp assets/img/team/team-lead-architect.webp team-lead-architect.7a92e9f3.webp
cp assets/img/team/team-cio.webp team-cio.61fee0f9.webp
cp assets/img/exchanges/probit.svg probit.f90d6d9b.svg
cp assets/img/exchanges/mexc.svg mexc.a18e1a45.svg
cp assets/img/partners/google.svg google.eff6c494.png
cp assets/img/partners/bpifrance.png bpifrance.b305f4a7.png
cp assets/img/partners/french-tech.png french-tech.01692393.png
cp assets/video/wallet_3d.webm wallet_3d.86c77392.webm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4