Github Actions
- Mkdir .github/workflows in repo
- Create below secrets in Repo Settings
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
BUCKET_NAME - Below is sample workflow for vue project. Add it in .github/workflows/buid-and-deploy-to-s3.yml
router.beforeEach((to, from, next) => {
if (to.meta.requiresAuth && !store.getters.isAuthenticated) {
next("/login'):
} else if (to.meta.requiresUnauth && store.getters.isAuthenticated) {
next("/home");
} else {
next():
}
});
<script src="https://unpkg.com/vue@latest"></script>
<script src="https://unpkg.com/axios@latest"></script>
<div id="app">
{{ message }}
</div>
<script>
App = {
data() {
return {
message: "Hello world!"
}
}
}
Vue.createApp(App).mount('#app');
</script>