Deploy locally
This commit is contained in:
parent
eef82077b2
commit
86e99ae1a4
6 changed files with 40 additions and 58 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
node_modules
|
|
||||||
dist
|
|
||||||
target
|
|
||||||
package-lock.json
|
|
||||||
.*
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"projects": {
|
|
||||||
"default": "schmelczer-dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
39
.forgejo/workflows/deploy.yml
Normal file
39
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: Check & deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
pull_request:
|
||||||
|
branches: ['main']
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: 'pages'
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '12'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Copy build to host pages mount
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
|
run: |
|
||||||
|
apt update && apt install -y rsync
|
||||||
|
mkdir -p /pages/photos
|
||||||
|
rsync -a --delete dist/ /pages/photos/
|
||||||
21
.github/workflows/main.yaml
vendored
21
.github/workflows/main.yaml
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
name: Deploy site
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
jobs:
|
|
||||||
firebase-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout current branch with lfs
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Build site
|
|
||||||
run: |
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
- name: Deploy html
|
|
||||||
uses: w9jds/firebase-action@master
|
|
||||||
with:
|
|
||||||
args: deploy --only hosting:photo-schmelczer-dev --project schmelczer-dev
|
|
||||||
env:
|
|
||||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
# Photos
|
# Photos
|
||||||
|
|
||||||

|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"hosting": {
|
|
||||||
"site": "photo-schmelczer-dev",
|
|
||||||
"public": "dist",
|
|
||||||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
|
|
||||||
"rewrites": [
|
|
||||||
{
|
|
||||||
"source": "**",
|
|
||||||
"destination": "/index.html"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"source": "**/*.@(jpg|jpeg|gif|png|webm|mp4)",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"key": "Cache-Control",
|
|
||||||
"value": "max-age=31536000"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue