-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
216fd6e
commit 0a2becb
Showing
3 changed files
with
80 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create .env file | ||
run: | | ||
echo "GITHUB_TOKEN=${{ secrets.SUPER_TOKEN}}" > .env | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: '.' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
async function fetchContributors() { | ||
const token = process.env.GITHUB_TOKEN; | ||
const repo = 'Robok-Engine/Robok-Engine'; | ||
|
||
try { | ||
const response = await fetch(`https://api.github.com/repos/${repo}/contributors`, { | ||
headers: { | ||
'Authorization': `token ${token}` | ||
} | ||
}); | ||
const data = await response.json(); | ||
|
||
if (response.ok) { | ||
const contributorsList = data.map(contributor => { | ||
return `<li><a href="https://github.com/${contributor.login}" target="_blank">${contributor.login}</a></li>`; | ||
}).join(''); | ||
|
||
const contributorsContainer = document.createElement('ul'); | ||
contributorsContainer.innerHTML = contributorsList; | ||
|
||
document.body.appendChild(contributorsContainer); | ||
} else { | ||
console.error('Failed to fetch contributors:', data); | ||
} | ||
} catch (error) { | ||
console.error('Error fetching contributors:', error); | ||
} | ||
} | ||
|
||
fetchContributors(); |