-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add github pages workflow #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5f1e5b5
19e5401
1ea3bf0
6b891d1
e946a10
2dbfed0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Deploy to GitHub Pages | ||
|
|
||
| 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: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Build with Astro | ||
| run: npm run build | ||
|
|
||
| - name: Upload artifact | ||
| if: github.event_name != 'pull_request' | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: ./dist | ||
|
|
||
| deploy: | ||
| if: github.event_name != 'pull_request' | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,13 @@ | ||
| # dependencies | ||
| node_modules/ | ||
|
|
||
| # build output | ||
| dist/ | ||
| .astro/ | ||
|
|
||
| # environment variables | ||
| .env | ||
| .env.production | ||
|
|
||
| # macOS-specific files | ||
| .DS_Store |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,13 @@ | ||
| import { defineConfig } from "astro/config"; | ||
| import { defineConfig } from 'astro/config'; | ||
|
|
||
| // https://astro.build/config | ||
| export default defineConfig({}); | ||
| // CONF WITHOUT REAL DOMAIN | ||
| export default defineConfig({ | ||
| site: 'https://python-spain.github.io', | ||
| base: '/2026.es.pycon.org', | ||
|
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suposo q haurem d'actualitzar al futur perquè sigui la URL directament https://2026.es.pycon.org
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sí, com bé dius, després l'haurem de modificar... ho he deixat comentat. no sé si us agrada.. |
||
| }); | ||
|
|
||
| //CONFIG WITH REAL DOMAIN | ||
| // export default defineConfig({ | ||
| // site: 'https://2026.es.pycon.org', | ||
| // base: '/', | ||
| // }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Este nombre va a funcionar con el DNS previsto?
la URL deberia ser
https://2026.es.pycon.orgy deberia salir todo de/There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
para que ahora funcionen los estáticos con githubpages debe añadirse el folder pero luego será '/' como dices... lo he dejado comentado en el código. no sé si os mola así.. o lo dejo en el canal de Discord?