From 96f282d53aa8512c71955fd82b44e47894c86806 Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Mon, 29 Apr 2024 18:32:03 +0200 Subject: [PATCH 1/4] Publish Action --- .gitea/workflows/publish.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 0d3a3a7..26e66ca 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -7,27 +7,26 @@ on: jobs: publish: timeout-minutes: 10 - runs-on: debian-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Checkout - name: Build run: | - npm --version && node --version - npm ci --no-update-notifier - npm run build - - uses: https://github.com/nwtgck/actions-netlify@v2.0 - name: Deploy + pnpm --version && node --version + pnpm ci + pnpm run build + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3.0 with: publish-dir: './dist' - production-deploy: true + production-branch: master github-token: ${{ secrets.GITHUB_TOKEN }} - deploy-message: "Deployed from Gitea Action" - enable-commit-comment: false + deploy-message: "Deploy from GitHub Actions" enable-pull-request-comment: false + enable-commit-comment: true overwrites-pull-request-comment: true - enable-github-deployment: false env: - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} timeout-minutes: 1 -- 2.40.1 From 8c98adb5d0c0a95834231e37f8adf4b1863224ce Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Mon, 29 Apr 2024 18:33:39 +0200 Subject: [PATCH 2/4] Switch Actions --- .../{workflows => unused}/vercel-preview.yaml | 0 .gitea/unused/vercel-production.yml | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+) rename .gitea/{workflows => unused}/vercel-preview.yaml (100%) create mode 100644 .gitea/unused/vercel-production.yml diff --git a/.gitea/workflows/vercel-preview.yaml b/.gitea/unused/vercel-preview.yaml similarity index 100% rename from .gitea/workflows/vercel-preview.yaml rename to .gitea/unused/vercel-preview.yaml diff --git a/.gitea/unused/vercel-production.yml b/.gitea/unused/vercel-production.yml new file mode 100644 index 0000000..727b98b --- /dev/null +++ b/.gitea/unused/vercel-production.yml @@ -0,0 +1,21 @@ +name: Vercel Production Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - main +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} -- 2.40.1 From 49a499c5063c7dd235f7a4d252eecfbddd4a29aa Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Mon, 29 Apr 2024 18:38:49 +0200 Subject: [PATCH 3/4] actions fix numero duo --- .../playwright.yml | 0 .../{workflows => _OFF_workflows}/publish.yml | 0 .github/workflows/gh-pages.yml | 14 -------- .github/workflows/netlify_publish.yml | 32 +++++++++++++++++++ 4 files changed, 32 insertions(+), 14 deletions(-) rename .gitea/{workflows => _OFF_workflows}/playwright.yml (100%) rename .gitea/{workflows => _OFF_workflows}/publish.yml (100%) delete mode 100644 .github/workflows/gh-pages.yml create mode 100644 .github/workflows/netlify_publish.yml diff --git a/.gitea/workflows/playwright.yml b/.gitea/_OFF_workflows/playwright.yml similarity index 100% rename from .gitea/workflows/playwright.yml rename to .gitea/_OFF_workflows/playwright.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/_OFF_workflows/publish.yml similarity index 100% rename from .gitea/workflows/publish.yml rename to .gitea/_OFF_workflows/publish.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index 04e2ce9..0000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: main - workflow_dispatch: - -jobs: - deploy: - uses: importantimport/.github/.github/workflows/pnpm-gh-pages.yml@main - permissions: - contents: write - with: - publish_dir: build diff --git a/.github/workflows/netlify_publish.yml b/.github/workflows/netlify_publish.yml new file mode 100644 index 0000000..26e66ca --- /dev/null +++ b/.github/workflows/netlify_publish.yml @@ -0,0 +1,32 @@ +name: 'Publish to Netlify' +on: + push: + branches: [ prod, deploy ] + pull_request: + branches: [ prod, deploy ] +jobs: + publish: + timeout-minutes: 10 + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + name: Checkout + - name: Build + run: | + pnpm --version && node --version + pnpm ci + pnpm run build + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3.0 + with: + publish-dir: './dist' + production-branch: master + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from GitHub Actions" + enable-pull-request-comment: false + enable-commit-comment: true + overwrites-pull-request-comment: true + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + timeout-minutes: 1 -- 2.40.1 From 3094b13a59c4cb939ce486812b94c4cd530bf1f7 Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Mon, 29 Apr 2024 19:33:38 +0200 Subject: [PATCH 4/4] actions update - build details, new, tokens --- .github/workflows/netlify_publish.yml | 12 +++---- src/lib/config/index.ts | 51 --------------------------- 2 files changed, 6 insertions(+), 57 deletions(-) delete mode 100644 src/lib/config/index.ts diff --git a/.github/workflows/netlify_publish.yml b/.github/workflows/netlify_publish.yml index 26e66ca..cb48882 100644 --- a/.github/workflows/netlify_publish.yml +++ b/.github/workflows/netlify_publish.yml @@ -9,7 +9,7 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 name: Checkout - name: Build run: | @@ -19,14 +19,14 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v3.0 with: - publish-dir: './dist' - production-branch: master - github-token: ${{ secrets.GITHUB_TOKEN }} - deploy-message: "Deploy from GitHub Actions" + publish-dir: './build' + production-branch: deploy + github-token: ${{ secrets.GH_TOKEN }} + deploy-message: "Deploy from Gitea Actions" enable-pull-request-comment: false enable-commit-comment: true overwrites-pull-request-comment: true env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - timeout-minutes: 1 + timeout-minutes: 5 diff --git a/src/lib/config/index.ts b/src/lib/config/index.ts deleted file mode 100644 index 117b525..0000000 --- a/src/lib/config/index.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { dev } from '$app/environment' - -/* Website config */ -const siteTitle = '' -const siteShortTitle = '' -const description = - 'I code, I think, I write. My thoughts go into the world of Free & Open Source Software, AI and philosophy of mind, Climate Change, Cybersecurity.' -const siteUrl = dev ? 'http://localhost:5174' : 'https://mattmor.in' -const author = 'Matt Morin' -const backgroundColor = '#111827' -const themeColor = '#3b82f6' -const logo = '/Logo.png' -const keywords = 'Dev, FOSS, Nix, Philosopher, DevOps, Climate' -const ogLanguage = 'en_US' -const siteLanguage = 'en-US' -const defaultOgImage = '' -const defaultOgSquareImage = '' -const defaultTwitterImage = '' - -// prettier-ignore -const website = { siteTitle, siteShortTitle, description, siteUrl, author, backgroundColor, themeColor, logo, keywords, ogLanguage, siteLanguage, defaultOgImage, defaultOgSquareImage, defaultTwitterImage }; - -/* Social Nicknames */ -const GHNick = 'matthieu42morin' -const LINick = 'mattmor-in' -const MatrixServer = '' -const MatrixNick = '' -const MastodonServer = 'mastodon.social' -const MastodonNick = '@matt_mor' - -const socialNicks = { GHNick, LINick, MatrixNick, MastodonNick } - -/* Social links */ -const Email = 'matt.b.morin@protonmail.com' -const Github = `https://github.com/${GHNick}` -const LinkedIn = `https://linkedin.com/in/${LINick}` -const Matrix = `https://${MatrixServer}/${MatrixNick}` -const Gitea = 'https://git.mattmor.in' -const Mastodon = `https://${MastodonServer}/${MastodonNick}` -const RSS = '/blog/feed' - -const socialLinks = { Email, Github, LinkedIn, Matrix, Gitea, Mastodon, RSS } - -// Routes -const NavRoutes = [ - { title: 'Home', href: '/' }, - { title: 'Blog', href: '/blog' }, - { title: 'Projects', href: '/projects' } -] - -export { website, socialNicks, socialLinks, NavRoutes } -- 2.40.1