-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.6 KB
/
Copy pathdeploy.yml
File metadata and controls
56 lines (48 loc) · 1.6 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
name: Deploy to GitHub Pages
# Pages ya no sirve el blog: el blog vive en https://stubborncoder.blog (VPS,
# ver despliegue-vps.yml). Aqui solo se publica un redirector, porque hay
# enlaces a stubborncoder.github.io en posts de LinkedIn ya publicados que no
# se pueden editar. Ver deploy/pages/redirector.html.
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Montar el redirector
run: |
mkdir -p sitio-pages
# La misma pagina como index.html y como 404.html: Pages sirve
# 404.html para cualquier ruta desconocida, y asi el redirector
# cubre tambien /blog/<post>/ conservando la ruta.
cp deploy/pages/redirector.html sitio-pages/index.html
cp deploy/pages/redirector.html sitio-pages/404.html
# Las tarjetas de enlace ya scrapeadas por LinkedIn apuntan a la
# imagen en este dominio: se mantiene para no romperlas.
cp public/og-image.png public/favicon.svg sitio-pages/
ls -la sitio-pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./sitio-pages
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4