Skip to content

Commit

Permalink
Merge branch 'master' into bump-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jun 19, 2023
2 parents 379ceec + 2286918 commit 1cf8cb0
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 324 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build
on:
push:
pull_request:

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
COMPOSE_FILE: "docker-compose.yml:docker-compose.ci.yml"
steps:
- name: Download source
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/bundle
tmp/.htmlproofer
key: gem-${{ hashFiles('Gemfile.lock') }}
restore-keys: gem-
- name: Build website
run: |
docker compose run --rm web /bin/bash -c "bundle check || bundle install --jobs=3"
docker compose run --rm web make build
- name: Test
run: |
docker compose run --rm web make check_html
docker compose run --rm web /bin/bash -c "make check_external_links || true" # allowed to fail
52 changes: 35 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
name: Build
name: Deploy
on:
push:
pull_request:
branches: [master]
workflow_dispatch:
inputs:
ref:
description: 'Branch, tag or commit SHA1 to build'
required: true
type: string
default: master

## cancel ongoing runs if the workflow is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
deploy:
name: Build and Deploy
runs-on: ubuntu-latest
if: github.repository_owner == 'crystal-lang'
env:
O: _site
COMPOSE_FILE: "docker-compose.yml:docker-compose.ci.yml"
GIT_REF: "${{ (github.event_name == 'workflow_dispatch' && inputs.ref) || github.ref }}"
steps:
- name: Download source
- name: Checkout ${{ env.GIT_REF }}
uses: actions/checkout@v3
with:
ref: ${{ env.GIT_REF }}
- name: Cache dependencies
uses: actions/cache@v3
with:
Expand All @@ -17,25 +37,23 @@ jobs:
tmp/.htmlproofer
key: gem-${{ hashFiles('Gemfile.lock') }}
restore-keys: gem-
- name: Fetch install.sh
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'crystal-lang'
run: |
make fetch_install.sh

- name: Build website
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker-compose run --rm web /bin/bash -c "bundle check || bundle install --jobs=3"
docker-compose run --rm web make check_html
docker-compose run --rm web /bin/bash -c "make check_external_links || true" # allowed to fail
docker compose run --rm web /bin/bash -c "bundle check || bundle install --jobs=3"
docker compose run -e O --rm web make build
sudo chown -R $(whoami):$(whoami) $O
- name: Fetch install.sh
run: |
make $O/install.sh
- name: Configure AWS Credentials
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'crystal-lang'
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to www.crystal-lang.org
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'crystal-lang'
- name: Sync to S3
run: |
aws s3 sync ./_site s3://crystal-website --delete
aws s3 sync ./$O s3://crystal-website --delete
./scripts/set-legacy-url-redirects.bash crystal-website < ./_data/legacy_non_pretty_urls.txt
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ deps: Gemfile.lock
Gemfile.lock: Gemfile
bundle install

.PHONY: fetch_install.sh
fetch_install.sh: ## Fetch install.sh from distribution-scripts repository
wget -N https://raw.githubusercontent.com/crystal-lang/distribution-scripts/master/packages/scripts/install.sh
.PHONY: $(O)/install.sh
$(O)/install.sh: ## Fetch install.sh from distribution-scripts repository
wget -O "$@" -N https://raw.githubusercontent.com/crystal-lang/distribution-scripts/master/packages/scripts/install.sh

.PHONY: update_sponsors
update_sponsors: scripts/merge.cr fetch_opencollective ## Update sponsor data (fetch from opencollective and merge into _data/sponsors.csv)
Expand Down
16 changes: 8 additions & 8 deletions _data/opencollective.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
"name": "Frisco Del Rosario",
"last_payment": 1.0,
"all_time": 3.0,
"all_time": 2.0,
"since": "May 8, 2023"
},
{
Expand Down Expand Up @@ -80,7 +80,7 @@
"name": "Bubble Shooter",
"url": "https://www.bubbleshooter.net/",
"last_payment": 5.0,
"all_time": 20.0,
"all_time": 25.0,
"since": "Feb 13, 2023"
},
{
Expand Down Expand Up @@ -302,7 +302,7 @@
{
"name": "Benjamin Klotz",
"last_payment": 25.0,
"all_time": 235.0,
"all_time": 260.0,
"since": "May 2, 2022"
},
{
Expand Down Expand Up @@ -333,7 +333,7 @@
"name": "Sufi Meditation",
"url": "https://www.zikir.com",
"last_payment": 5.0,
"all_time": 70.0,
"all_time": 75.0,
"since": "Mar 26, 2022"
},
{
Expand Down Expand Up @@ -431,7 +431,7 @@
{
"name": "Michael Wagner",
"last_payment": 5.0,
"all_time": 95.0,
"all_time": 100.0,
"since": "Nov 11, 2021"
},
{
Expand Down Expand Up @@ -620,7 +620,7 @@
{
"name": "Joseph Method",
"last_payment": 5.0,
"all_time": 115.0,
"all_time": 120.0,
"since": "Jul 9, 2021"
},
{
Expand Down Expand Up @@ -671,7 +671,7 @@
"name": "Windesol Sähkön Kilpailutus",
"url": "https://windesol.fi",
"last_payment": 5.0,
"all_time": 120.0,
"all_time": 125.0,
"since": "Jun 8, 2021"
},
{
Expand Down Expand Up @@ -1247,7 +1247,7 @@
"since": "May 9, 2020"
},
{
"name": "Glen Aultman-Bettridge",
"name": "Glen A-B",
"last_payment": 5.0,
"all_time": 185.0,
"since": "May 5, 2020"
Expand Down
16 changes: 8 additions & 8 deletions _data/sponsors.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sponsors/concentric.png,Concentric,https://concentric.health,$75,$375,"Feb 2, 20
,Ricardo Tomasi,https://ricardo.cc,$25,$825,"Oct 9, 2020",25
,Casinoonlineaams.com,https://www.casinoonlineaams.com,$25,$625,"May 26, 2021",25
,CHUNG TSAI,,$25,$550,"Sep 3, 2021",25
,Benjamin Klotz,,$25,$235,"May 2, 2022",25
,Benjamin Klotz,,$25,$260,"May 2, 2022",25
,Jeremy Woertink,,$25,$75,"Mar 30, 2023",25
,pitosalas,,$20,$825,"Dec 20, 2017",10
,Christos Zisopoulos,,$10,$660,"Jun 23, 2016",10
Expand Down Expand Up @@ -63,7 +63,7 @@ sponsors/concentric.png,Concentric,https://concentric.health,$75,$375,"Feb 2, 20
,igorkasyanchuk,https://phototo.com.ua/,$5,$205,"Nov 2, 2017",5
,Martin Honermeyer,,$5,$205,"Jul 24, 2018",5
,elliot,,$5,$185,"Dec 9, 2018",5
,Glen Aultman-Bettridge,,$5,$185,"May 5, 2020",5
,Glen A-B,,$5,$185,"May 5, 2020",5
,Oleksii Neishchenko,,$5,$185,"Jun 9, 2020",5
,Nobuaki Tanaka,https://twitter.com/tomerun,$5,$185,"Jun 10, 2020",5
,devtrackers.gg,https://devtrackers.gg,$5,$180,"Dec 9, 2018",5
Expand All @@ -78,26 +78,26 @@ sponsors/concentric.png,Concentric,https://concentric.health,$75,$375,"Feb 2, 20
,Lukas Svoboda,,$5,$135,"Sep 21, 2015",5
,Auttawut Wiriyakreng,,$5,$135,"Mar 25, 2021",5
,Netin nopeustesti,https://netinnopeustesti.com/,$5,$125,"May 27, 2021",5
,Windesol Sähkön Kilpailutus,https://windesol.fi,$5,$125,"Jun 8, 2021",5
,Provided.io,https://provided.io,$5,$125,"Jun 15, 2021",5
,ryan-senn,https://tt.edu.au,$5,$120,"Jan 4, 2020",5
,Windesol Sähkön Kilpailutus,https://windesol.fi,$5,$120,"Jun 8, 2021",5
,Renkaatsopivasti,https://renkaatsopivasti.fi,$5,$120,"Jul 2, 2021",5
,Agloks,,$5,$120,"Jul 8, 2021",5
,Joseph Method,,$5,$115,"Jul 9, 2021",5
,Joseph Method,,$5,$120,"Jul 9, 2021",5
,Marco Roth,https://marcoroth.dev,$5,$110,"Mar 4, 2020",5
,Wolfgang Klinger,,$5,$110,"Mar 9, 2020",5
,Taletidskortnu,https://taletidskort.nu,$5,$110,"Aug 25, 2021",5
,eason.ye,https://github.com/yelanxin,$5,$105,"Sep 17, 2021",5
,Mia Bennett,https://chillfox.com/,$5,$105,"Oct 1, 2021",5
,maltidsbarometeret,https://maltidsbarometeret.dk,$5,$100,"Oct 19, 2021",5
,Michael Wagner,,$5,$100,"Nov 11, 2021",5
,Jeffrey Crochet,,$5,$100,"Mar 2, 2023",5
,HelppoHinta.fi,https://helppohinta.fi/,$5,$95,"Oct 1, 2021",5
,Michael Wagner,,$5,$95,"Nov 11, 2021",5
,PROXYONE LLC,https://proxyone.eu/,$5,$80,"Feb 21, 2022",5
,Anton Maminov,https://twitter.com/AntonMaminov,$5,$80,"Feb 23, 2022",5
,bit4bit,,$5,$80,"Mar 9, 2022",5
,Sufi Meditation,https://www.zikir.com,$5,$75,"Mar 26, 2022",5
,Seth Falco,https://falco.fun/,$5,$75,"Jul 23, 2022",5
,Sufi Meditation,https://www.zikir.com,$5,$70,"Mar 26, 2022",5
,SureBet,https://www.sure.bet/casinos-not-on-gamstop/,$5,$60,"Jun 17, 2022",5
,CouponBlender,https://www.couponblender.com/,$5,$60,"Jun 30, 2022",5
,salt rock lamp,,$5,$40,"Apr 11, 2021",5
Expand All @@ -109,7 +109,7 @@ sponsors/concentric.png,Concentric,https://concentric.health,$75,$375,"Feb 2, 20
,Hiptoro,https://hiptoro.com,$5,$25,"Jan 17, 2023",5
,Displaybenchmark,https://displaybenchmark.com/,$5,$25,"Jan 20, 2023",5
,Fresh Engagements,https://freshengagements.com/,$5,$25,"Jan 24, 2023",5
,Bubble Shooter,https://www.bubbleshooter.net/,$5,$20,"Feb 13, 2023",5
,Bubble Shooter,https://www.bubbleshooter.net/,$5,$25,"Feb 13, 2023",5
,Kiekkotorni - Nikotiinipussit,https://kiekkotorni.com/,$5,$20,"Feb 24, 2023",5
,Soc-Promotion,https://soc-promotion.com/instagram/likes,$5,$20,"Mar 2, 2023",5
,egtslot,https://slot-egt.com/,$5,$10,"May 8, 2023",5
Expand All @@ -129,7 +129,7 @@ sponsors/concentric.png,Concentric,https://concentric.health,$75,$375,"Feb 2, 20
,Kendall Park,,$1,$37,"Nov 22, 2018",1
,Sergey Kojin,,$1,$26,"Oct 7, 2019",1
,GOKI MORI,,$1,$7,"Mar 16, 2023",1
,Frisco Del Rosario,,$1,$3,"May 8, 2023",1
,Frisco Del Rosario,,$1,$2,"May 8, 2023",1
,Dutchie,,$0,"$3,450","Nov 23, 2020",0
,Tumbler Lock,,$0,"$1,500","Dec 27, 2018",0
,Julien Reichardt,,$0,"$1,150","Dec 13, 2018",0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ We will be hosting these packages at [https://bintray.com/crystal](https://bintr

The current apt and rpm packages in [https://dist.crystal-lang.org](https://dist.crystal-lang.org/) will be available and receive stable updates until November 2020 as a transition period.

The [installation script](/install.sh) allows installing the latest stable version by default:
The [installation script](https://crystal-lang.org/install.sh) allows installing the latest stable version by default:

```shell-session
$ curl -fsSL https://crystal-lang.org/install.sh -o install.sh
Expand Down
Loading

0 comments on commit 1cf8cb0

Please sign in to comment.