Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
646b648
refactoring small stuff
pReya Nov 18, 2024
1f46c6e
fix: update package-lock
pReya Nov 18, 2024
1d8b2b8
fix: refactor
pReya Nov 20, 2024
a2a2ece
fix: content updates
pReya Nov 20, 2024
1bfe317
fix: community pages split up
pReya Nov 21, 2024
3cd2be6
fix: legal notice
pReya Nov 21, 2024
164472a
fix: menu rebasing
pReya Nov 21, 2024
2b0aaab
fix: text updates
pReya Dec 9, 2024
438cf48
chore: menu items, community headers
pReya Dec 9, 2024
74b9ee6
fix: deprecate airtable news
pReya Dec 9, 2024
e78d37f
fix: wooden lace images
pReya Dec 9, 2024
8e728da
fix: maker empowerment hubs
pReya Dec 9, 2024
79ee0cd
fix: empowerment hubs
pReya Dec 9, 2024
2f6b5fb
fix: empowerment hubs
pReya Dec 9, 2024
83845df
fix: remove participant from maker awards
pReya Dec 9, 2024
a5af68b
fix: hubs page
pReya Dec 9, 2024
11c8486
fix: workflows
pReya Dec 9, 2024
bef8722
fix: workflows
pReya Dec 9, 2024
fc40143
fix: workflows
pReya Dec 9, 2024
a06ef4f
fix: rename folders
pReya Dec 9, 2024
2cea8f1
fix: ua translations
pReya Dec 9, 2024
0233b58
fix: syntax error
pReya Dec 9, 2024
7554397
fix: translations
pReya Dec 10, 2024
c2c56de
fix: remove images
pReya Dec 10, 2024
ced9dd3
fix: improve deployment workflow
pReya Dec 10, 2024
6b5bead
fix: remove bad quality image
pReya Dec 10, 2024
a2cc164
fix: quotation marks
pReya Dec 10, 2024
8447c6a
fix: workflows
pReya Dec 10, 2024
18da862
fix: workflows
pReya Dec 10, 2024
080c029
fix: update ua home page
pReya Dec 10, 2024
c6cca2a
fix: workflows
pReya Dec 10, 2024
d4ecd72
fix: workflows
pReya Dec 10, 2024
c26b07b
fix: workflow
pReya Dec 10, 2024
fccf571
fix: workflow
pReya Dec 10, 2024
8b425de
fix: workflow
pReya Dec 10, 2024
d49bf37
fix: workflow
pReya Dec 10, 2024
8e2a851
fix: workflow
pReya Dec 10, 2024
5894c9b
fix: workflow
pReya Dec 10, 2024
1701804
fix: workflow
pReya Dec 10, 2024
7212bea
fix: config
pReya Jan 6, 2025
21a694d
fix: add text changes
pReya Jan 6, 2025
736d30c
fix: live deployment workflow
pReya Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 38 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,73 @@
name: Github Pages Astro CI
name: Live Deployment

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
workflow_dispatch:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
schedule:
- cron: '48 10 * * *'
- cron: '48 17 * * *'

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
environment: github-pages
environment: netcup-bitbetter
env:
ASTRO_CONFIG: ${{ secrets.ASTRO_CONFIG }}
PUBLIC_MAPBOX_TOKEN: ${{ secrets.PUBLIC_MAPBOX_TOKEN }}
AIRTABLE_TOKEN: ${{ secrets.AIRTABLE_TOKEN }}
INTERVENTIONS_AIRTABLE_BASE_ID: ${{ secrets.INTERVENTIONS_AIRTABLE_BASE_ID }}
NEWS_AIRTABLE_BASE_ID: ${{ secrets.NEWS_AIRTABLE_BASE_ID }}
steps:
- name: Checkout your repository using git
- name: Checkout repository using git
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
node-version: 22
- name: Replace config file with Prod version
run: echo "$ASTRO_CONFIG" > astro.config.mjs
- name: Install Node dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Move images News
run: mv public/images/news/dynamic/* dist/images/news/dynamic/
- name: Move images Interventions
run: mv public/images/interventions/dynamic/* dist/images/interventions/dynamic/
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-artifact@v3
with:
name: deployment
retention-days: 5
path: ./dist

deploy:
needs: build
environment: netcup-bitbetter
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
SFTP_HOST: ${{ secrets.SFTP_HOST }}
SFTP_PATH: ${{ secrets.SFTP_PATH }}
SFTP_USER: ${{ secrets.SFTP_USER }}
SFTP_PASSWORD: ${{ secrets.SFTP_PASSWORD }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: deployment
path: dist
- name: Install LFTP
run: sudo apt-get install -y lftp
- name: Add SSH Known Hosts
run: |
mkdir -p ~/.ssh/
echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- name: List dir
run: |
pwd
ls -la
- name: Deploy via LFTP to SFTP target
run: lftp -e "set ftp:list-options -a; set net:timeout 5; set net:max-retries 3; set net:reconnect-interval-base 5; open sftp://$SFTP_HOST; user $SFTP_USER $SFTP_PASSWORD; mirror --reverse --only-newer --ignore-time --verbose --delete ./dist ./$SFTP_PATH/${GITHUB_HEAD_REF//\//-} --exclude pdfjs/ ; bye"

27 changes: 15 additions & 12 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
environment: ionos
environment: netcup-bitbetter
env:
ASTRO_CONFIG: ${{ secrets.ASTRO_CONFIG }}
PUBLIC_MAPBOX_TOKEN: ${{ secrets.PUBLIC_MAPBOX_TOKEN }}
Expand All @@ -22,21 +22,21 @@ jobs:
NEWS_AIRTABLE_BASE_ID: ${{ secrets.NEWS_AIRTABLE_BASE_ID }}
steps:
- name: Set env to use shell substitution logic
run: echo "ASTRO_BASE_PATH=${GITHUB_HEAD_REF//\//-}" >> $GITHUB_ENV
run: |
echo "TARGET_URL=https://${GITHUB_HEAD_REF//\//-}.dev.tolocar.org" >> $GITHUB_ENV
- name: Checkout repository using git
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
node-version: 22
- name: Replace config file with Prod version
run: echo "$ASTRO_CONFIG" > astro.config.mjs
- run: cat astro.config.mjs
- name: Install Node dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Move images News
run: mv public/images/news/dynamic/* dist/images/news/dynamic/
- name: Move images Interventions
run: mv public/images/interventions/dynamic/* dist/images/interventions/dynamic/
- name: Upload artifact
Expand All @@ -48,21 +48,24 @@ jobs:

deploy:
needs: build
environment: ionos
environment: netcup-bitbetter
runs-on: ubuntu-latest
env:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
SFTP_HOST: ${{ secrets.SFTP_HOST }}
SFTP_PATH: ${{ secrets.SFTP_PATH }}
SFTP_USER: ${{ secrets.SFTP_USER }}
SFTP_PASSWORD: ${{ secrets.SFTP_PASSWORD }}

steps:
- name: Set env to use shell substitution logic
run: echo "ASTRO_BASE_PATH=${GITHUB_HEAD_REF//\//-}" >> $GITHUB_ENV
run: |
echo "TARGET_URL=https://${GITHUB_HEAD_REF//\//-}.dev.tolocar.org" >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: deployment
path: ${{ env.ASTRO_BASE_PATH }}
path: dist
- name: Install LFTP
run: sudo apt-get install -y lftp
- name: Add SSH Known Hosts
Expand All @@ -74,16 +77,16 @@ jobs:
pwd
ls -la
- name: Deploy via LFTP to SFTP target
run: lftp -e "set ftp:list-options -a; set net:timeout 5; set net:max-retries 3; set net:reconnect-interval-base 5; open sftp://$SFTP_HOST; user $SFTP_USER $SFTP_PASSWORD; mirror --reverse --verbose --delete ./${GITHUB_HEAD_REF//\//-}; bye"
run: lftp -e "set ftp:list-options -a; set net:timeout 5; set net:max-retries 3; set net:reconnect-interval-base 5; open sftp://$SFTP_HOST; user $SFTP_USER $SFTP_PASSWORD; mirror --reverse --only-newer --ignore-time --verbose --delete ./dist ./$SFTP_PATH/${GITHUB_HEAD_REF//\//-} --exclude pdfjs/ ; bye"
- name: Comment on PR
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ Successfully deployed to: https://dev.tolocar.org/${{ env.ASTRO_BASE_PATH }}'
body: `✅ Successfully deployed to: ${process.env.TARGET_URL}`
})

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.8
v22
25 changes: 14 additions & 11 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
import svgr from "vite-plugin-svgr";

export default defineConfig({
site: "https://www.tolocar.org",
site: process?.env?.TARGET_URL || "https://www.tolocar.org",
devToolbar: { enabled: false },
integrations: [
mdx({
rehypePlugins: [[rehypeAutolinkHeadings, { behavior: "append" }]],
}),
react(),
tailwind({
config: { applyBaseStyles: false },
}),
],
integrations: [mdx({
rehypePlugins: [[rehypeAutolinkHeadings, { behavior: "append" }]],
}), react(), tailwind({
config: { applyBaseStyles: false },
})],
vite: {
plugins: [svgr()],
},
});
redirects: {
'/en/community': '/en/community/partners',
'/en/playbook': '/en/resources/playbook',
'/ua/playbook': '/ua/resources/playbook',
'/en/makersinnovationaward': '/en/get-involved/makers-innovation-award',
'/ua/makersinnovationaward': '/ua/get-involved/makers-innovation-award'
}
});
10 changes: 5 additions & 5 deletions base.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@
font-stretch: normal;
}

.custom-prose {
.custom-prose *:not(.not-prose) {
@apply text-neutral-500 text-base leading-[22px] lg:text-lg lg:leading-6;
}

.custom-prose strong {
.custom-prose strong:not(.not-prose) {
@apply text-tolo-black;
}

.custom-prose p + p {
@apply mt-4;
}

.custom-prose a {
.custom-prose a:not(.not-prose) {
@apply underline;
}

.custom-prose h2 {
.custom-prose h2:not(.not-prose) {
@apply font-bold text-3xl text-neutral-800 my-4;
}

.custom-prose h3 {
.custom-prose h3:not(.not-prose) {
@apply font-semibold text-2xl text-neutral-800 my-4;
}

Expand Down
9 changes: 9 additions & 0 deletions news-json/en/0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recYRMJR45ojTp7Pw",
"description": "MakerAcademy promotion",
"target": "https://www.instagram.com/p/C0BgRk8Nm-a/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recYRMJR45ojTp7Pw.png",
"order": 0
}
9 changes: 9 additions & 0 deletions news-json/en/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recvTZI9Bsxfx4ou2",
"description": "Tolocar's new partner",
"target": "https://www.instagram.com/p/C0T3GK0NnvY/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recvTZI9Bsxfx4ou2.jpg",
"order": 1
}
9 changes: 9 additions & 0 deletions news-json/en/10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recdIY54s72wEPHN3",
"description": "Playbook for Mobile Makerspaces: Community Impact Highlight",
"target": "https://www.instagram.com/p/C3PqL1VN5eA/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recdIY54s72wEPHN3.jpg",
"order": 10
}
9 changes: 9 additions & 0 deletions news-json/en/11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recYImvfRqwx7FkTE",
"description": "Playbook for Mobile Makerspaces: Technology in Action",
"target": "https://www.instagram.com/p/C3VT2DWN4Uf/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recYImvfRqwx7FkTE.png",
"order": 11
}
9 changes: 9 additions & 0 deletions news-json/en/12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "rec15udPdgU2QjgmF",
"description": "Playbook for Mobile Makerspaces: Distributed Manufacturing",
"target": "https://www.instagram.com/p/C3iHXDwNPek/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/rec15udPdgU2QjgmF.png",
"order": 12
}
9 changes: 9 additions & 0 deletions news-json/en/13.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recHxDFVAQKJtMzhJ",
"description": "Making furniture drawings",
"target": "https://www.instagram.com/p/C3zw9sYNVJi/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recHxDFVAQKJtMzhJ.jpg",
"order": 13
}
9 changes: 9 additions & 0 deletions news-json/en/14.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "rec8XBE9PILmMtcpA",
"description": "Kyiv Maker Faire 2024 - Recap",
"target": "https://www.instagram.com/p/C4LhKSut4fw/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/rec8XBE9PILmMtcpA.png",
"order": 14
}
9 changes: 9 additions & 0 deletions news-json/en/15.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recKKHunymQW7SEQ0",
"description": "Ivano-Frankivsk: 3D modelling/printing therapeutic workshop for veterans",
"target": "https://www.instagram.com/p/C4c4jY1NRwX/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recKKHunymQW7SEQ0.png",
"order": 15
}
9 changes: 9 additions & 0 deletions news-json/en/16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recPaWH4jthW4rIiw",
"description": "KNUCA plotter and hot wire workshop",
"target": "https://www.instagram.com/p/C4xfqeFNHBd/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recPaWH4jthW4rIiw.png",
"order": 16
}
9 changes: 9 additions & 0 deletions news-json/en/17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "rechfcqSamQFkHeLa",
"description": "NGO \"Tourist Association Hutsuliia\" - finalist of MIA",
"target": "https://www.instagram.com/p/C47fnheNuT5/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/rechfcqSamQFkHeLa.jpg",
"order": 17
}
9 changes: 9 additions & 0 deletions news-json/en/18.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recTuujX9w57faAnc",
"description": "Kyiv: Making furniture on the yeti smart bench in school",
"target": "https://www.instagram.com/p/C5QVQyONOH2/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recTuujX9w57faAnc.jpg",
"order": 18
}
9 changes: 9 additions & 0 deletions news-json/en/19.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recpnWiz3lhFSUwf3",
"description": "Tolocar support for 3D concrete printing business",
"target": "https://www.instagram.com/p/C58E8_KOFLT/?img_index=1",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recpnWiz3lhFSUwf3.jpg",
"order": 19
}
9 changes: 9 additions & 0 deletions news-json/en/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "recyyItR9klpIZVgd",
"description": "Kalynivske visit: house renovation",
"target": "https://www.instagram.com/p/C0tUiUiNsaZ/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA==",
"type": "instagram",
"newTab": true,
"image": "/images/news/dynamic/recyyItR9klpIZVgd.jpg",
"order": 2
}
Loading
Loading